Rest-High-Level-Client:fix uri encode bug when url path start with '/'#34436
Rest-High-Level-Client:fix uri encode bug when url path start with '/'#34436hub-cap merged 2 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-core-infra |
|
Hi @roycarser, sorry for taking a while to get back to you. I researched the problem, and whats happening is part of the forward slashes are being interpreted as a blank authority, as per https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/net/URI.java#L3161-L3166 . Changing the |
hub-cap
left a comment
There was a problem hiding this comment.
doh, I didnt leave the prior comment about the URI construction as a 'request changes', sorry about extra notification!
|
that's fine, I will finish it quickly |
f89efb9 to
c025ebc
Compare
|
Id like you to leave a comment in there expressing why we need the authority to be non empty. Something like Please note that I tested this with a blank / empty authority and it worked as well, so lets remove the |
…' . Relates to issues elastic#34433
|
The code has been commited. |
|
Hi @roycarser, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile? |
hub-cap
left a comment
There was a problem hiding this comment.
awesome. Ill run it thru the paces and then backport it accordingly
|
@elasticmachine ok to test |
|
Thank you for the commit! Im going to backport it accordingly to 7.1.0 |
This commit sets the authority of a URI to blank such that it does not misinterpret slashes in the path as the authority. Closes #34433
* elastic/master: (25 commits) Rollup ignores time_zone on date histogram (elastic#40844) HLRC: fix uri encode bug when url path starts with '/' (elastic#34436) Mutes GatewayIndexStateIT.testRecoverBrokenIndexMetadata Docs: Pin two IDs in the rest client (elastic#40785) Adds version 6.7.2 [DOCS] Remind users to include @ symbol when applying license file (elastic#40688) HLRC: Convert xpack methods to client side objects (elastic#40705) Allow ILM to stop if indices have nonexistent policies (elastic#40820) Add an OpenID Connect authentication realm (elastic#40674) [DOCS] Rewrite query def (elastic#40746) [ML] Changes default destination index field mapping and adds scripted_metric agg (elastic#40750) Docs: Drop inline callouts from painless book (elastic#40805) [ML] refactoring start task a bit, removing unused code (elastic#40798) [DOCS] Document index.load_fixed_bitset_filters_eagerly (elastic#40780) Make remote cluster resolution stricter (elastic#40419) [ML] Add created_by info to usage stats (elastic#40518) SQL: [Docs] Small fixes for CURRENT_TIMESTAMP docs (elastic#40792) convert modules to use testclusters (elastic#40804) Replace javax activation with jakarta activation (elastic#40247) Document restrictions on fuzzy matching when using synonyms (elastic#40783) ...
* elastic/master: (36 commits) Remove unneded cluster config from test (elastic#40856) Make Fuzziness reject illegal values earlier (elastic#33511) Remove test-only customisation from TransReplAct (elastic#40863) Fix dense/sparse vector limit documentation (elastic#40852) Make -try xlint warning disabled by default. (elastic#40833) Async Snapshot Repository Deletes (elastic#40144) Revert "Replace usages RandomizedTestingTask with built-in Gradle Test (elastic#40564)" Init global checkpoint after copy commit in peer recovery (elastic#40823) Replace usages RandomizedTestingTask with built-in Gradle Test (elastic#40564) [DOCS] Removed redundant (not quite right) information about upgrades. Remove string usages of old transport settings (elastic#40818) Rollup ignores time_zone on date histogram (elastic#40844) HLRC: fix uri encode bug when url path starts with '/' (elastic#34436) Mutes GatewayIndexStateIT.testRecoverBrokenIndexMetadata Docs: Pin two IDs in the rest client (elastic#40785) Adds version 6.7.2 [DOCS] Remind users to include @ symbol when applying license file (elastic#40688) HLRC: Convert xpack methods to client side objects (elastic#40705) Allow ILM to stop if indices have nonexistent policies (elastic#40820) Add an OpenID Connect authentication realm (elastic#40674) ...
This commit sets the authority of a URI to blank such that it does not misinterpret slashes in the path as the authority. Closes elastic#34433
|
Seeing this issue in 6.8, any chance we can get this backported to 6.8 also? |
Closes #34433"
set userinfo and host parts of URI to something not null so that the path part will not be parsed as them