Allow / in template image filename
This commit is contained in:
parent
cd92e8486d
commit
95f31b9cfa
@ -111,8 +111,8 @@ class ShellScriptVirtualization(VirtualizationInterface):
|
|||||||
def create(self, email: str, id: str, template_image_file_name: str, vcpus: int, memory_mb: int, ssh_public_keys: list):
|
def create(self, email: str, id: str, template_image_file_name: str, vcpus: int, memory_mb: int, ssh_public_keys: list):
|
||||||
validate_capsul_id(id)
|
validate_capsul_id(id)
|
||||||
|
|
||||||
if not re.match(r"^[a-zA-Z0-9_.-]+$", template_image_file_name):
|
if not re.match(r"^[a-zA-Z0-9/_.-]+$", template_image_file_name):
|
||||||
raise ValueError(f"template_image_file_name \"{template_image_file_name}\" must match \"^[a-zA-Z0-9_.-]+$\"")
|
raise ValueError(f"template_image_file_name \"{template_image_file_name}\" must match \"^[a-zA-Z0-9/_.-]+$\"")
|
||||||
|
|
||||||
for ssh_public_key in ssh_public_keys:
|
for ssh_public_key in ssh_public_keys:
|
||||||
if not re.match(r"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$", ssh_public_key):
|
if not re.match(r"^(ssh|ecdsa)-[0-9A-Za-z+/_=@. -]+$", ssh_public_key):
|
||||||
|
Loading…
Reference in New Issue
Block a user