Merge pull request #9440 from AllForNothing/cve-check

Remove CVE ID check
This commit is contained in:
Will Sun 2019-10-18 10:32:18 +08:00 committed by GitHub
commit 932ed32de5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 26 deletions

View File

@ -339,19 +339,8 @@ export class SystemSettingsComponent implements OnChanges, OnInit {
}
isDisabled(): boolean {
if (this.cveIds) {
let arr = this.cveIds.split(/[\n,]+/);
let flag = false;
for (let i = 0; i < arr.length; i++) {
let id = arr[i].trim();
if (!/^CVE-[\d]+-[\d]+$/.test(id)) {
flag = true;
break;
}
}
return flag;
}
return true;
let str = this.cveIds;
return !(str && str.trim());
}
get expiresDate() {

View File

@ -303,19 +303,8 @@ export class ProjectPolicyConfigComponent implements OnInit {
}
isDisabled(): boolean {
if (this.cveIds) {
let arr = this.cveIds.split(/[\n,]+/);
let flag = false;
for (let i = 0; i < arr.length; i++) {
let id = arr[i].trim();
if (!/^CVE-[\d]+-[\d]+$/.test(id)) {
flag = true;
break;
}
}
return flag;
}
return true;
let str = this.cveIds;
return !(str && str.trim());
}
get expiresDate() {