Skip to content

Commit a4bfc52

Browse files
author
Martii
committed
Fix logical AND to logical OR for file uploads to prevent accidental too large of files posted.
Affects OpenUserJS#360
1 parent 8de97bd commit a4bfc52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ exports.uploadScript = function (aReq, aRes, aNext) {
12261226
var failUrl = '/user/add/' + (isLib ? 'lib' : 'scripts');
12271227

12281228
// Reject non-js and huge files
1229-
if (script.type !== 'application/javascript' &&
1229+
if (script.type !== 'application/javascript' ||
12301230
script.size > settings.maximum_upload_script_size) {
12311231
return aRes.redirect(failUrl);
12321232
}

0 commit comments

Comments
 (0)