Skip to content

Commit

Permalink
Ensure casing on username is identical for S3 retrieval from DB (#1086)
Browse files Browse the repository at this point in the history
Applies to #486 / #180 / #130 / #130 (comment) / #819 

Auto-merge
  • Loading branch information
Martii authored Apr 20, 2017
1 parent 6efcd92 commit 583c4a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ exports.getSource = function (aReq, aCallback) {
return;
}

// Ensure casing on username is identical for S3 retrieval
if (aReq.params.username !== aScript.author) {
aReq.params.username = aScript.author;
installNameBase = getInstallNameBase(aReq, { hasExtension: true });
}

s3Object = s3.getObject({
Bucket: bucketName,
Key: installNameBase + (isLib ? '.js' : '.user.js')
Expand Down

0 comments on commit 583c4a5

Please sign in to comment.