nextcloud / fulltextsearch_elasticsearch

🔍 Use Elasticsearch to index the content of your Nextcloud
GNU Affero General Public License v3.0
81 stars 29 forks source link

Crash when servlet address contains a slash #58

Open patschi opened 5 years ago

patschi commented 5 years ago

It appears there's a small issue when the servlet address contains a slash, the address was like: http://user:pa/ss@127.0.0.1:9200. Removing the slash solves this.

Resulting in following error when executing the test command:

- Search Platform:
Elasticsearch 1.2.4
An unhandled exception has been thrown:
TypeError: array_key_exists() expects parameter 2 to be array, boolean given in /apps/fulltextsearch_elasticsearch/lib/Platform/ElasticSearchPlatform.php:130

This was following code: https://github.com/nextcloud/fulltextsearch_elasticsearch/blob/43005676f9adec9681a8a4137b0f3ae51600ad3a/lib/Platform/ElasticSearchPlatform.php#L130

Apparently the used URL is invalid, what causes parse_url() to return false as described in the php docs.

ArtificialOwl commented 5 years ago

I think the issue is with the slash '/' in the password