Skip to content

Commit 583c4a5

Browse files
authored
Ensure casing on username is identical for S3 retrieval from DB (#1086)
Applies to #486 / #180 / #130 / #130 (comment) / #819 Auto-merge
1 parent 6efcd92 commit 583c4a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

controllers/scriptStorage.js

+6
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,12 @@ exports.getSource = function (aReq, aCallback) {
328328
return;
329329
}
330330

331+
// Ensure casing on username is identical for S3 retrieval
332+
if (aReq.params.username !== aScript.author) {
333+
aReq.params.username = aScript.author;
334+
installNameBase = getInstallNameBase(aReq, { hasExtension: true });
335+
}
336+
331337
s3Object = s3.getObject({
332338
Bucket: bucketName,
333339
Key: installNameBase + (isLib ? '.js' : '.user.js')

0 commit comments

Comments
 (0)