mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-18 00:45:06 +00:00
policy/v2: rewrite tag-name first-letter check via De Morgan
This commit is contained in:
parent
d32d91d9fb
commit
48e22ab769
1 changed files with 1 additions and 1 deletions
|
|
@ -542,7 +542,7 @@ func (t *Tag) Validate() error {
|
|||
}
|
||||
|
||||
first := rest[0]
|
||||
if !((first >= 'a' && first <= 'z') || (first >= 'A' && first <= 'Z')) {
|
||||
if (first < 'a' || first > 'z') && (first < 'A' || first > 'Z') {
|
||||
return ErrTagNameMustStartWithLetter
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue