mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 22:35:27 +00:00
Merge pull request #222 from manuelbua/fix-severity-filtering-border-case
Fix minor issue where a dangling comma can cause any severity to match
This commit is contained in:
commit
b3ca1aa0d9
@ -191,7 +191,7 @@ func isNewPath(path string, pathMap map[string]bool) bool {
|
|||||||
|
|
||||||
func hasMatchingSeverity(templateSeverity string, allowedSeverities []string) bool {
|
func hasMatchingSeverity(templateSeverity string, allowedSeverities []string) bool {
|
||||||
for _, s := range allowedSeverities {
|
for _, s := range allowedSeverities {
|
||||||
if strings.HasPrefix(templateSeverity, s) {
|
if s != "" && strings.HasPrefix(templateSeverity, s) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user