1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Dont use string comparison to rank labels. (#393)

This commit is contained in:
Sascha L. Teichmann 2023-07-06 12:34:52 +02:00 committed by GitHub
parent 4d68662913
commit b423eed4e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -107,7 +107,7 @@ func (rlc *rolieLabelChecker) checkProtection(
// the data again with the open client. // the data again with the open client.
// If this does not result in status forbidden the // If this does not result in status forbidden the
// server may be wrongly configured. // server may be wrongly configured.
case label >= csaf.TLPLabelAmber: case tlpLevel(label) >= tlpLevel(csaf.TLPLabelAmber):
p.badAmberRedPermissions.use() p.badAmberRedPermissions.use()
// It is an error if we downloaded the advisory with // It is an error if we downloaded the advisory with
// an unauthorized client. // an unauthorized client.