Comments (4)
from azurite.
Snippet which causes the regression:
if (isSecondary) {
const pos = blobContext.authenticationPath.search(SECONDARY_SUFFIX);
blobContext.authenticationPath =
blobContext.authenticationPath.substr(0, pos) +
blobContext.authenticationPath.substr(pos + SECONDARY_SUFFIX.length);
}
Now, this works fine for non-production URLs like - 127.0.0.1:10000/devaccount-secondary/testcontainer. As there is a secondary suffix in the authentication path - /devaccount-secondary/testcontainer. So this path gets transformed to /devaccount/testcontainer
Now, let's take a look at production URL trying to access a secondary storage, devaccount-secondary.sample.com/testcontainer.
The authentication path looks like this - /testcontainer.
now, when we search for secondary_suffix, the code would return -1 (non-existence). In the next line, we are doing a substring of (0,-1) and (-1+10) - (9). So, the resulting string would be "ainer". This causes the authentication string to be malformed and results in authentication errors for production style secondary URLs.
from azurite.
Thanks for finding and investigation of this issue!
Azurite welcome contribution!
Would you like to raise a PR to fix this issue?
from azurite.
I have reviewed your PR, and raised a comment for change log and test case.
Would you please help to look?
from azurite.
Related Issues (20)
- Azurite does not support AzCopy
- Server failed to authenticate the request.Make sure the value of the Authorization header is formed correctly including the signature HOT 5
- Response have metadata always when using List Containers API HOT 4
- Blob - UndeleteAsync - APINotImplemented HOT 3
- Running Azurite with custom port using docker compose HOT 4
- Table Api Query on Int64 (long) column returning extra results HOT 1
- Expect Azurite to fail when inserting doubles greater than MAX_VALUE but succeeds instead HOT 2
- Azurite alway return 400 when use sasUrl generate by Azurite HOT 1
- 3.30.0 - StartCopyFromUriAsync - 500 Error HOT 7
- stageBlock API does not return Content-MD5 HOT 1
- [FeatureRequest] VsCode Command for checking if azurite blob service is running or start service only if service is not running HOT 1
- TableClient.CreateQueryFilter(predicate) treating long data type filter as string type. HOT 2
- 403 error when trying to use `UserDelegationKey` HOT 4
- Copy Blob From URL (Sync) does not support `x-ms-copy-source-tag-option` HOT 1
- SQL Server 2022 Polybase with Azurite - file in use?
- VS Code "azurite.blobHost" config doesn't seem to work HOT 3
- Blob Tag Support HOT 2
- Upload From Url API is not implement yet? HOT 5
- Is there a web portal to check the received objects? HOT 2
- Azurite cannot handle encoded blob names HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azurite.