Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
86da60aa0d
@ -208,7 +208,7 @@ def create():
|
|||||||
@account_required
|
@account_required
|
||||||
def ssh_public_keys():
|
def ssh_public_keys():
|
||||||
errors = list()
|
errors = list()
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
method = request.form["method"]
|
method = request.form["method"]
|
||||||
content = None
|
content = None
|
||||||
@ -223,7 +223,7 @@ def ssh_public_keys():
|
|||||||
name = parts[0]
|
name = parts[0]
|
||||||
else:
|
else:
|
||||||
errors.append("Name is required")
|
errors.append("Name is required")
|
||||||
elif 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("Name must match \"^[0-9A-Za-z_@. -]+$\"")
|
||||||
|
|
||||||
if method == "POST":
|
if method == "POST":
|
||||||
@ -232,7 +232,7 @@ def ssh_public_keys():
|
|||||||
errors.append("Content is required")
|
errors.append("Content is required")
|
||||||
else:
|
else:
|
||||||
content = content.replace("\r", "").replace("\n", "")
|
content = content.replace("\r", "").replace("\n", "")
|
||||||
if not re.match(r"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$", content):
|
if not re.match(r"^(ssh|ecdsa)-[0-9A-Za-z+/_=@\. -]+$", content):
|
||||||
errors.append("Content must match \"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$\"")
|
errors.append("Content must match \"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$\"")
|
||||||
|
|
||||||
if get_model().ssh_public_key_name_exists(session["account"], name):
|
if get_model().ssh_public_key_name_exists(session["account"], name):
|
||||||
@ -342,4 +342,4 @@ def account_balance():
|
|||||||
)),
|
)),
|
||||||
has_payments=len(payments)>0,
|
has_payments=len(payments)>0,
|
||||||
account_balance=format(balance_now, '.2f')
|
account_balance=format(balance_now, '.2f')
|
||||||
)
|
)
|
||||||
|
3
capsulflask/schema_migrations/03_down_openbsd67.sql
Normal file
3
capsulflask/schema_migrations/03_down_openbsd67.sql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
UPDATE os_images SET id = 'openbsd66' WHERE id = 'openbsd67'
|
||||||
|
UPDATE os_images SET template_image_file_name = 'openbsd-cloud-2020-05.qcow2' WHERE id = 'openbsd66'
|
||||||
|
UPDATE os_images SET description = 'OpenBSD 6.6' WHERE id = 'openbsd66'
|
3
capsulflask/schema_migrations/03_up_openbsd67.sql
Normal file
3
capsulflask/schema_migrations/03_up_openbsd67.sql
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
UPDATE os_images SET id = 'openbsd67' WHERE id = 'openbsd66'
|
||||||
|
UPDATE os_images SET template_image_file_name = 'openbsd-6.7-x86_64.qcow2' WHERE id = 'openbsd67'
|
||||||
|
UPDATE os_images SET description = 'OpenBSD 6.7' WHERE id = 'openbsd67'
|
Loading…
Reference in New Issue
Block a user