Skip to content

Commit

Permalink
Fix eTag as well (#1828)
Browse files Browse the repository at this point in the history
* Use the "binary" form instead of the string form.

Post #1826

Auto-merge
  • Loading branch information
Martii committed Jul 21, 2021
1 parent 715c10b commit cab7e47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,8 @@ exports.sendScript = function (aReq, aRes, aNext) {
// Calculate SRI of the source sha512sum
eTag = '"sha512-' +
Buffer.from(
crypto.createHash('sha512').update(source).digest('hex')
).toString('base64') + ' .min.user.js"';
crypto.createHash('sha512').update(source).digest('base64')
) + ' .min.user.js"';

}
} catch (aE) { // On any failure default to unminified
Expand Down

0 comments on commit cab7e47

Please sign in to comment.