improve invalid ssh key name error message

This commit is contained in:
forest 2021-05-12 12:18:39 -05:00
parent e3e1059ba1
commit 4590671984

View File

@ -313,7 +313,7 @@ def ssh_public_keys():
else:
errors.append("Name is required")
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":
content = request.form["content"]