-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Process triggers and notifications also on exception during ActiveSca…
…ns sendAndReceive. Fixes #7004 Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
- Loading branch information
1 parent
0e49dcb
commit 0d4ba97
Showing
20 changed files
with
663 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
zap/src/main/java/org/zaproxy/zap/extension/ascan/ActiveScanProcessedCellItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Zed Attack Proxy (ZAP) and its related class files. | ||
* | ||
* ZAP is an HTTP/HTTPS proxy for assessing web application security. | ||
* | ||
* Copyright 2022 The ZAP Development Team | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.zaproxy.zap.extension.ascan; | ||
|
||
public class ActiveScanProcessedCellItem implements Comparable<ActiveScanProcessedCellItem> { | ||
|
||
private final boolean successful; | ||
private final String label; | ||
|
||
public ActiveScanProcessedCellItem(boolean successful, String label) { | ||
this.successful = successful; | ||
this.label = label; | ||
} | ||
|
||
public boolean isSuccessful() { | ||
return successful; | ||
} | ||
|
||
public String getLabel() { | ||
return label; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return label; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return 31 * (successful ? 1231 : 1237); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
if (obj == null) { | ||
return false; | ||
} | ||
if (getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
ActiveScanProcessedCellItem other = (ActiveScanProcessedCellItem) obj; | ||
if (successful != other.successful) { | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
@Override | ||
public int compareTo(ActiveScanProcessedCellItem other) { | ||
if (other == null) { | ||
return 1; | ||
} | ||
if (successful && !other.successful) { | ||
return 1; | ||
} else if (!successful && other.successful) { | ||
return -1; | ||
} | ||
return label.compareTo(other.label); | ||
} | ||
} |
Oops, something went wrong.