fix: 定时任务表达式校验 (#4325)

Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-07-02 12:26:26 +08:00 committed by GitHub
parent ab0ca371c9
commit 1458e08924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 14 deletions

View File

@ -312,26 +312,12 @@ function checkListField(value, minimal, maximal ) {
values[j] = st[j]; values[j] = st[j];
} }
var previousValue = -1;
for (var i= 0; i < values.length; i++) { for (var i= 0; i < values.length; i++) {
var currentValue = values[i]; var currentValue = values[i];
if (!checkIntValue(currentValue, minimal, maximal, true)) { if (!checkIntValue(currentValue, minimal, maximal, true)) {
return false; return false;
} }
try {
var val = parseInt(currentValue, 10);
if (val <= previousValue) {
return false;
} else {
previousValue = val;
}
} catch (e) {
// we have always an int
}
} }
return true; return true;