Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AF-161 Fix Build #104

Merged
merged 9 commits into from
Aug 31, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ class AttackFlowValidator extends DiagramValidator {
this.addError(id, "Invalid MIME Type.");
}
// Validate Payload Bin, URL, and Hashes
if (payloadBin?.isDefined() && (url?.isDefined() || hashes?.isDefined()) ||
(url?.isDefined() && !hashes?.isDefined()) ||
(hashes?.isDefined() && !url?.isDefined())) {
this.addError(id, "An artifact must have either a payload or a URL + hash, but not both.");
if (payloadBin?.isDefined() === url?.isDefined()) {
mikecarenzo marked this conversation as resolved.
Show resolved Hide resolved
this.addError(id, "An artifact must have either a payload or a URL, but not both.");
} else if (url?.isDefined() && !hashes?.isDefined()) {
this.addError(id, "An artifact with a URL must have at least one hash.");
}
// Validate hashes
if(hashes?.isDefined()) {
Expand Down
Loading