-
Notifications
You must be signed in to change notification settings - Fork 331
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
Signature Error for Query Containing Spaces Encoded as + #1696
Comments
Thanks for raising this issue! We will investigate it, but might will need time. Before we fix it, would you like to use "%20" instead of "+" to workaround this issue? |
Thank you for the quick response, unfortunately the Rust URL library doesn't provide a way to configure its escaping, at least as far as I'm aware. We only use azurite for tests, and so I have just suppressed the test for this behaviour, and so there is no major rush from my end. |
It looks this issue not repro on my machine, I tried Azurite 3.20.1 + Node 16.15.1, and Azurite 3.10.0 + Node 12.13.0 (OS is Windows 10 Enterprise 22H2), both work well in list blob from container with "prefix=foo+bar%2F" in the URI query. Would you please share more details about you test environment, like the OS, detail node version...?
|
I have double checked this occurs with the latest version. How are you making the request to azurite, are you including an authentication payload, as this is where the issue is? The corresponding curl command is
|
@tustvold It looks the problem is caused by decodeURIComponent() used in following line can't pare "+" to space.
I will look into it and update you later. |
The fix is already released in https://github.com/Azure/Azurite/releases/tag/v3.21.0 |
Which service(blob, file, queue, table) does this issue concern?
Blob, but potentially others
Which version of the Azurite was used?
3.18.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
mcr.microsoft.com/azure-storage/azurite
What's the Node.js version?
What problem was encountered?
As described in the URL standard spaces in a query string may be encoded as
+
, and not%20
. This is what the standard Rust URL library will always do. As per the specification for Azure this will be URL-decoded as part of generating the canonical string to sign.For example,
GET http://localhost:10000/devstoreaccount1/tustvold?restype=container&comp=list&prefix=foo+bar%2F
would result inHowever, making this request to azurite returns a signature error. My guess is it is only percent decoding the query parameters and not url decoding them, and therefore ends up with a different string to sign.
The same request to a Azure proper succeeds
Steps to reproduce the issue?
Noticed in apache/arrow-rs#2801, let me know if you need a more specific example
Have you found a mitigation/solution?
No
The text was updated successfully, but these errors were encountered: