elastic / sense

A JSON aware developer's interface to Elasticsearch. Comes with handy machinery such as syntax highlighting, autocomplete, formatting and code folding.
Other
381 stars 134 forks source link

Automatically encode special characters in path #151

Closed lukasolson closed 8 years ago

lukasolson commented 8 years ago

See https://github.com/elastic/kibana/issues/7183.

This was actually fixed in Kibana here: https://github.com/elastic/kibana/pull/7067

We'd like to apply this fix to the Sense plugin so that it applies to Kibana 4.x.

Notes from @ycombinator:

My first question is if this was intentional or inadvertent

I went through the code in the PR that fixed the issue (https://github.com/elastic/kibana/pull/7067) and it looks to be inadvertent. It looks like the fix was introduced in this commit (specifically the changes in es.js) and this commit (specifically the changes to the handler function in index.js) when the uri query string parameter from the browser->kibana server request went from containing the absolute ES API URI to just the relative ES API URI.

and my other question is how plausible it is that the portion of this PR that fixed this could be backported to 4.5.x and 4.x? (It would be in the Sense repo instead obviously.)

I don't think this would be too difficult. I'm guessing the fix would be something along the lines of making sure the query parameter is URL-encoded when it currently probably isn't. I'm happy to look into backporting the fix into the Sense repo if you don't have the bandwidth. Just let me know or assign relevant issue(s) to me!

ycombinator commented 8 years ago

Fixed via #152. Released in Sense v2.0.0-beta6. To install this version now, run:

./bin/kibana plugin --install elasticsearch/sense/2.0.0-beta6