Comments (13)
What are the problematic file names?
from aws-sdk-net.
The example below is not found without URLEncoded
"Systems/20/1161/185_185_CF NEUSA GOMES FERREIRA.DOC"
But the following example is not found if the URL is with URLEncoded
"Systems/20/1161/184_184_RE SOLICITAÇÕES - 31 07 - CF.MSG"
from aws-sdk-net.
Have you tried these paths with the most recent versions of the SDK?
from aws-sdk-net.
Pavel, I'm using the latest version I believe (2.0.0.2). There is a larger version of this? Tks
from aws-sdk-net.
The latest version is 2.0.2 (and 1.5.39 if using the v1 SDK).
from aws-sdk-net.
Pavel, I discovered what was happening, in fact, when it includes the "URLEncoded" to set in the "key" of the request object, looking at the object seemed to be all right, but internally, more precisely between lines 98 and 113 of the class "S3Signer.cs "was launched again" URLEncode ", generating an encoding upon a URL already coded.
As said before, I still had other problems, but when running the procedure again, the URLs were eventually found. I'm performing further tests to see if some other error occurs.
From what I understand the method "URLEncode" should not be used directly because the URLs are already coded internally.
Anyway thank you and sorry for posting.
from aws-sdk-net.
You're correct, strings that are passed into the SDK should generally not be URLEncode-d unless specifically called out.
Can you expand a bit on what "other problems" had caused the URLs to not come back? I'm curious if other users may face a similar issue.
from aws-sdk-net.
I was having problems with some URLs, but so far have not gotten over the mistake.
Performed tests on 5k records, and all were successful. Tonight put into production, and the number has increased to 7m of records, should take a few days to carry out the whole process, then I know exactly whether or not there is a problem with some URL.
When finished, I'll come back and post the result.
from aws-sdk-net.
Pavel, I made some more tests and found the following problem:
If you have a file with Url that contains the character "!" (Exclamation), the status code returned in the response is "Forbiden" and not "Found" or "NotFound". If I remove the character "!" then it returns me "Found" or "NotFound". I believe that if I am seeking a Metadata and address of the file does not exist the answer should be "NotFound".
I followed all the assembly request to see what might be happening, one of the things I found is that the Url will only coded for the metric (HEADER), but the Url that is included in the request, despite also suffering the urlencoded just not entering encoded.
I'll try to explain what I found:
Between line 264 and 267 in class "AbstractServiceClient.cs" to write to the variable "newPath" with UrlEncode, but to write to variable "url" which is an instance of URI, the builder removes the encoded URI. In the next block (between lines 272 and 284), the variable "url" ends up being overwritten, erasing the information already recorded.
Not sure what the problem I have with the character "!" is for the reason mentioned above, but apparently the problem is because the request is not encrypted and for some reason Amazon does not accept the Url with this character, this could happen? Would not it be interesting to send the Url also encoded in the request?
from aws-sdk-net.
Sorry, I've tried to boil this down to the simplest case in the below code and still was not able to get an error:
client.PutObject(new PutObjectRequest
{
Key = "Test!.txt",
ContentBody = "Sample content",
BucketName = bucketName
});
client.GetObjectMetadata(new GetObjectMetadataRequest
{
Key = "Test!.txt",
BucketName = bucketName
});
Can you try to reproduce this issue with a similar test case?
from aws-sdk-net.
Pavel really your example set no error occurred, but using your code realized changing the file name and then errors are shown again. See below:
client.PutObject(new PutObjectRequest
{
Key = "Test/Folder1/185211/4_4_4_4_4_ENC URGENTE!! SOLICITAÇÕES - 2008 - CN.txt",
ContentBody = "Sample content",
BucketName = bucketName
});
client.GetObjectMetadata(new GetObjectMetadataRequest
{
Key = "Test/Folder1/185211/4_4_4_4_4_ENC URGENTE!! SOLICITAÇÕES - 2008 - CN.txt",
BucketName = bucketName
});
from aws-sdk-net.
Thanks, this case does reproduce for me. We're looking into this.
from aws-sdk-net.
The latest version of the SDK (version 2.0.2.3) is patched to resolve this issue.
from aws-sdk-net.
Related Issues (20)
- AWSSDK.Extensions.NETCore.Setup support for RDSAuthTokenGenerator HOT 2
- AWS SDK not working on Android build HOT 6
- Incorrect behaviour of S3 client with minio and Gitlab ci HOT 3
- Incorrect behavior when deleting a message that's already been moved to the DLQ HOT 2
- AWSSDK.S3 3.7.307.4 escapes colon in bucket name in GetPreSignedURL HOT 7
- AWSSDK.Core triggers CWE-798 - Hardcoded credentials HOT 9
- Amazon.S3.AmazonS3Exception (Error making request with Error Code Forbidden and Http Status Code Forbidden) with Polygon.io HOT 5
- NET core doesn't has S3FileInfo class HOT 2
- DynamoDB Object persistence Model does not respect `required` keyword HOT 5
- AmazonBedrockAgentRuntimeClient.RetrieveAndGenerateAsync throws an exception HOT 4
- Amazon.IdentityStore CreateUser Not Sending Email Verification Link HOT 2
- SQS 3.7.201.0+ GetQueueAttributesAsync with "All" does not work when trying to fetch queue attributes HOT 1
- How to set ExternalId when using AWSSDK.Extensions.NETCore.Setup HOT 3
- X-Amz-Content-SHA256 should be present when querying Amazon OpenSearch Serverless HOT 2
- DynamoDB AttributeValue roundtrip of empty number or string sets HOT 13
- V4 Development: General strategy on how to fill in missing APIs HOT 5
- TransferUtility does not support downloading objects in Requester Pays buckets. HOT 10
- DisableFetchingTableMetadata leads to key exception if PropertyConverter is used HOT 3
- `region` set in profile in `$HOME/.aws/config` is ignored HOT 11
- TransferUtilityUploadRequest.UploadProgressEvent event not firing HOT 10
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 aws-sdk-net.