Skip to content

Commit 4d744d6

Browse files
author
Martii
committed
Ensure casing on username is identical for S3 retrieval from DB
Applies to OpenUserJS#486 / OpenUserJS#180 / OpenUserJS#130 / OpenUserJS#130 (comment) / OpenUserJS#819
1 parent 6efcd92 commit 4d744d6

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)