mirror of
https://github.com/juanfont/headscale.git
synced 2026-07-17 16:36:02 +00:00
policy/v2: rewrite tag-name first-letter check via De Morgan
This commit is contained in:
parent
87c6d9b68e
commit
e007ce2ffa
1 changed files with 1 additions and 1 deletions
|
|
@ -562,7 +562,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