Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion libs/scriptStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,13 @@ function invalidKey(aAuthorName, aScriptName, aIsLib, aKeyName, aKeyValue) { //
// NOTE: value needs to be decoded already since MongoDB and AWS doesn't store that
matches = keyValueUtf.match(rAnyLocalMetaUrl);
if (matches) {
if (cleanFilename(aAuthorName, '').toLowerCase() +
if (/\.min$/.test(matches[2])) {
return new statusError({
message: '`@' + aKeyName +
'` must not be a minified URL.',
code: 403 // Forbidden
});
} else if (cleanFilename(aAuthorName, '').toLowerCase() +
'/' + cleanFilename(aScriptName, '') ===
matches[1].toLowerCase() + '/' + matches[2]) {
// Same script
Expand Down