[FL-1620] Cli command list crash fix. Correct name validation in scripts. (#613)

* Scripts: fix incorrect name validation regexp.
* Cli: fix command list iteration.
This commit is contained in:
あく
2021-07-29 18:27:06 +03:00
committed by GitHub
parent 12113b480d
commit 4c85bfedca
2 changed files with 23 additions and 16 deletions

View File

@@ -89,7 +89,7 @@ class Main:
if len(self.args.name) > 8:
self.parser.error("Name is too long. Max 8 symbols.")
if re.match(r"[a-zA-Z0-9]+", self.args.name) is None:
if re.match(r"^[a-zA-Z0-9.]+$", self.args.name) is None:
self.parser.error(
"Name contains incorrect symbols. Only a-zA-Z0-9 allowed."
)