Skip to content

Commit c8f461c

Browse files
committed
Merge pull request OpenUserJS#361 from Martii/Issue-360fixLogicForMaxSize
Fix logical AND to logical OR for file uploads to prevent accidental too... Auto merge
2 parents 8de97bd + a4bfc52 commit c8f461c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/user.js

+1-1
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)