improve invalid ssh key name error message
This commit is contained in:
parent
e3e1059ba1
commit
4590671984
@ -313,7 +313,7 @@ def ssh_public_keys():
|
|||||||
else:
|
else:
|
||||||
errors.append("Name is required")
|
errors.append("Name is required")
|
||||||
if not re.match(r"^[0-9A-Za-z_@:. -]+$", name):
|
if not re.match(r"^[0-9A-Za-z_@:. -]+$", name):
|
||||||
errors.append("Name must match \"^[0-9A-Za-z_@:. -]+$\"")
|
errors.append(f"Key name '{name}' must match \"^[0-9A-Za-z_@:. -]+$\"")
|
||||||
|
|
||||||
if method == "POST":
|
if method == "POST":
|
||||||
content = request.form["content"]
|
content = request.form["content"]
|
||||||
|
Loading…
Reference in New Issue
Block a user