Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where URL is being signed after being quoted #839

Closed
wants to merge 2 commits into from

Conversation

fabiopedrosa
Copy link

Description

URL is being signed after being quoted, but should be before.

Issues Resolved

Closed #833

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.34%. Comparing base (ba715b9) to head (7c11911).
Report is 71 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #839      +/-   ##
==========================================
- Coverage   71.95%   70.34%   -1.61%     
==========================================
  Files          91      113      +22     
  Lines        8001     8897     +896     
==========================================
+ Hits         5757     6259     +502     
- Misses       2244     2638     +394     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad we narrowed it down, thanks!

I don't think this is the right fix though. The URL could have been already quoted before, in which case it will start failing again. Look for where it gets quoted in the first place, and preserve the original URL to be used here for signing.

Start by writing a failing test, too, and let's make sure it exists for all transport classes.

@fabiopedrosa
Copy link
Author

fabiopedrosa commented Oct 29, 2024

@dblock I agree, I just won't have time to do that work right now. Is it something AWS can contribute to?

@dblock
Copy link
Member

dblock commented Oct 29, 2024

@dblock I agree, I just won't have time to do that work right now. Is it something AWS can contribute to?

We can see. Do you have a ticket with customer support by any chance?

@mingshl
Copy link

mingshl commented Nov 25, 2024

it seems this ticket is out of dated. can you please close it ?@fabiopedrosa

@dblock
Copy link
Member

dblock commented Nov 27, 2024

Fixed in #848.

@dblock dblock closed this Nov 27, 2024
@dblock
Copy link
Member

dblock commented Nov 27, 2024

@fabiopedrosa If you're relying on the fix you proposed here I suggest reverting to HEAD (and the next release of opensearch-py). This fix doesn't work in half the cases with indices with special characters for example.

@fabiopedrosa
Copy link
Author

@dblock just tried using HEAD and works great. thank you a lot for the fixes, and thank you @nathaliellenaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Bug with AWS if id has special characters
3 participants