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

Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-07-02 12:26:06 +08:00 committed by GitHub
parent ed30e4e74f
commit 490403abfb
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];
}
var previousValue = -1;
for (var i= 0; i < values.length; i++) {
var currentValue = values[i];
if (!checkIntValue(currentValue, minimal, maximal, true)) {
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;