Page MenuHomeVyOS Platform

Value validation for domain-groups seems to be broken
Closed, ResolvedPublicBUG

Description

When trying to add a firewall domain-group, the value validation fails although it should be compliant according to the error message:

# set firewall group domain-group h_asdf

  Name of domain-group can only contain alpha-numeric letters, hyphen, underscores and not start with numeric
  Value validation failed
  Set failed

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202303020317
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

There is the regex
It seems don't validate correctly if only one letter before the hyphen, underscores

vyos@r14# set firewall group domain-group a_aa 

  
  
  Name of domain-group can only contain alpha-numeric letters, hyphen, underscores and not start with numeric
  Value validation failed
  Set failed

[edit]
vyos@r14# set firewall group domain-group aa_aa 
[edit]
vyos@r14#

Maybe this will fit [a-zA-Z_][a-zA-Z0-9]?[\w\-\.]*

Looking at the regex it seems that . (dot) is also allowed. Is that right? If so, the error message should be altered accordingly.

Maybe this [a-zA-Z_](?:[a-zA-Z0-9_\-\.]{0,}[a-zA-Z0-9_\-])?

Viacheslav added a project: VyOS 1.5 Circinus.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.