fix: preserve trailing slashes in normalizeUri for SigV4
Deploy FileDrop / deploy (push) Successful in 36s
Deploy FileDrop / deploy (push) Successful in 36s
The empty-segment skip in normalizeUri (introduced in round 1 fix) was stripping trailing slashes from canonical URIs, e.g. /bucket/ became /bucket. The AWS SDK signs with the trailing slash intact, so signatures never matched for any S3 operation with a body. The fix: only skip '.' segments (dot-segment removal per RFC 3986), preserve all other segments including empty ones from trailing slashes and double slashes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -152,6 +152,7 @@ export const handleS3Request = async (
|
||||
const method = req.method;
|
||||
const url = new URL(req.url);
|
||||
const pathname = url.pathname;
|
||||
if (pathname !== '/') console.error('S3_REQ:' + method + ' ' + pathname);
|
||||
const { bucket, key } = virtualHostBucket
|
||||
? {
|
||||
bucket: virtualHostBucket,
|
||||
|
||||
Reference in New Issue
Block a user