Escape Hyphen in Regular Expression (#4006)
* Escape Hyphen in Regular Expression * Add Test * Fix Linting Errors * Use Pytest Parameterize Marker * Fix Black Formatting Errors * Interpolate / Use Raw String * fixes string formatting Co-authored-by: Correna Sprowls <correna.sprowls@joinroot.com>
This commit is contained in:
parent
479ce861a7
commit
8d4007f2b6
2 changed files with 20 additions and 21 deletions
|
|
@ -1007,7 +1007,7 @@ class SimpleSystemManagerBackend(BaseBackend):
|
|||
if (
|
||||
"//" in value
|
||||
or not value.startswith("/")
|
||||
or not re.match("^[a-zA-Z0-9_.-/]*$", value)
|
||||
or not re.match(r"^[a-zA-Z0-9_.\-/]*$", value)
|
||||
):
|
||||
raise ValidationException(
|
||||
'The parameter doesn\'t meet the parameter name requirements. The parameter name must begin with a forward slash "/". '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue