Skip to content

Fix URI encoding for special characters in blob names #39

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

Merged
merged 1 commit into from
May 23, 2025

Conversation

JoeDupuis
Copy link
Member

@JoeDupuis JoeDupuis commented May 23, 2025

Summary

  • Fix URI encoding for special characters in blob names to prevent crashes when flushing test containers
  • Update generate_uri method to match Azure Storage Ruby gem's exact encoding approach
  • Fix HTML entity decoding issues in blob name listing

Changes

  • Updated generate_uri method in client.rb to use CGI.escape with proper post-processing
  • Fixed HTML entity decoding in blob_list.rb by using element.text instead of element.get_text.to_s
  • Added comprehensive tests for special character handling in blob names
  • Updated existing tests to account for backslash-to-forward-slash conversion

Fixes #35

- Update generate_uri method to use CGI.escape with proper post-processing
- Convert backslashes to forward slashes and handle URL encoding correctly
- Fix HTML entity decoding in blob_list.rb for proper blob name retrieval
- Add comprehensive tests for special character handling
- Ensure compatibility with Azure Storage Ruby gem specifications

Fixes #35
@JoeDupuis JoeDupuis merged commit e43b060 into main May 23, 2025
7 checks passed
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.

Broken key escape
1 participant