mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 10:45:45 +01:00
Merge pull request #9440 from AllForNothing/cve-check
Remove CVE ID check
This commit is contained in:
commit
932ed32de5
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user