mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 12:46:03 +01:00
Remove CVE ID check
Signed-off-by: sshijun <sshijun@vmware.com>
This commit is contained in:
parent
285d3e1e5c
commit
645e9331b0
@ -339,19 +339,8 @@ export class SystemSettingsComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isDisabled(): boolean {
|
isDisabled(): boolean {
|
||||||
if (this.cveIds) {
|
let str = this.cveIds;
|
||||||
let arr = this.cveIds.split(/[\n,]+/);
|
return !(str && str.trim());
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get expiresDate() {
|
get expiresDate() {
|
||||||
|
@ -303,19 +303,8 @@ export class ProjectPolicyConfigComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isDisabled(): boolean {
|
isDisabled(): boolean {
|
||||||
if (this.cveIds) {
|
let str = this.cveIds;
|
||||||
let arr = this.cveIds.split(/[\n,]+/);
|
return !(str && str.trim());
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get expiresDate() {
|
get expiresDate() {
|
||||||
|
Loading…
Reference in New Issue
Block a user