Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e68848d1eb |
No files matched your search
@@ -2053,7 +2053,7 @@ func parseTagPercents(value string) (map[string]int64, error) {
|
|||||||
|
|
||||||
percent, err := strconv.ParseInt(item[colon+1:], 10, 64)
|
percent, err := strconv.ParseInt(item[colon+1:], 10, 64)
|
||||||
if err != nil || percent < 1 || percent > 99 {
|
if err != nil || percent < 1 || percent > 99 {
|
||||||
return nil, fmt.Errorf("%q %w", MaskZoneKey(item[colon+1:]), errNotTagPercent)
|
return nil, fmt.Errorf("%q %w", item[colon+1:], errNotTagPercent)
|
||||||
}
|
}
|
||||||
|
|
||||||
if tag == ExploitSignatureTag {
|
if tag == ExploitSignatureTag {
|
||||||
|
|||||||
@@ -1480,10 +1480,6 @@ func TestErrorOfATagSettingLeavesOutAZoneKey(t *testing.T) {
|
|||||||
`"` + spamhausMasked + `" is not a tag, : and a percentage, ` +
|
`"` + spamhausMasked + `" is not a tag, : and a percentage, ` +
|
||||||
"such as vpn:50 or asn=14061:25",
|
"such as vpn:50 or asn=14061:25",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
tagLimitPercent, "50:" + tag,
|
|
||||||
`"` + spamhausMasked + `" is not a percentage from 1 to 99`,
|
|
||||||
},
|
|
||||||
{tagLimitPercent, tag + ":50," + tag + " :25", twice},
|
{tagLimitPercent, tag + ":50," + tag + " :25", twice},
|
||||||
{tagLimitPercent, tag + ":50,,", emptyItem},
|
{tagLimitPercent, tag + ":50,,", emptyItem},
|
||||||
} {
|
} {
|
||||||
|
|||||||
Reference in new issue
Block a user