Code Monkey home page Code Monkey logo

Comments (5)

Braskalyne avatar Braskalyne commented on June 2, 2024

I forgot to mention: I tried with a new Sulu project and an ES 7.17 image and had exactly the same problem.

from elasticsearch-php.

ezimuel avatar ezimuel commented on June 2, 2024

I'm not familiar with Sulu, so I can only try to help. Moreover, we are not supporting anymore 6.x of elasticsearch-php.
That said, did you try to use the double quotation to set the URL?

For instance:

ELASTICSEARCH_HOST="http://elastic:[email protected]:9200"

or

ELASTIC_PASSWORD="toto?"

The ? character is not allowed in the URL so this will be encoded at the end with %3F but the encoding is managed by elasticsearch-php itself.

from elasticsearch-php.

Braskalyne avatar Braskalyne commented on June 2, 2024

I'm trying with a 7.17 image just to be sure.
If i'm trying

ELASTICSEARCH_HOST="http://elastic:[email protected]:9200"

i got

In ClientBuilder.php line 811:
                                                              
  Could not parse URI: "http://elastic:[email protected]:9200"  

from elasticsearch-php.

ezimuel avatar ezimuel commented on June 2, 2024

@Braskalyne sorry for the late reply. DId you solve this or is still an issue?
I'm wondering, the ELASTIC_PASSWORD that you used in the docker compose is an env variable that you created or something managed by Sulu?
Instead of passing the username:password in the URL you can also use the setBasicAuthentication() function of the ClientBuilder, as follows:

$client = ClientBuilder::create()
   ->setHosts(['127.0.0.1:9200'])
   ->setBasicAuthentication('elastic', 'toto?')
   ->build();

from elasticsearch-php.

Braskalyne avatar Braskalyne commented on June 2, 2024

@ezimuel

In the end, I tested several characters 1 by 1 to determine which would pass through the string and which would break the connection, so as to be able to offer the security team enough characters to make the password secure. Here are the ones I tested:

Work: .!*&~;_-$()
Not working: ?@#^[]{}%.

For example, (Tp3&(..!56xV--_&$ is working

from elasticsearch-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.