fix(fmt): apply cargo fmt to proxmox command ISO validation
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m51s
Test / frontend-typecheck (pull_request) Successful in 2m4s
PR Review Automation / review (pull_request) Successful in 5m32s
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
Some checks failed
Test / frontend-tests (pull_request) Successful in 1m51s
Test / frontend-typecheck (pull_request) Successful in 2m4s
PR Review Automation / review (pull_request) Successful in 5m32s
Test / rust-clippy (pull_request) Has been cancelled
Test / rust-fmt-check (pull_request) Has been cancelled
Test / rust-tests (pull_request) Has been cancelled
This commit is contained in:
parent
64fc808908
commit
51311b9e83
@ -652,7 +652,10 @@ fn validate_pve_identifier(value: &str, field: &str) -> Result<(), String> {
|
|||||||
if value.is_empty() {
|
if value.is_empty() {
|
||||||
return Err(format!("{} must not be empty", field));
|
return Err(format!("{} must not be empty", field));
|
||||||
}
|
}
|
||||||
if !value.chars().all(|c| c.is_ascii_alphanumeric() || c == '.' || c == '-' || c == '_') {
|
if !value
|
||||||
|
.chars()
|
||||||
|
.all(|c| c.is_ascii_alphanumeric() || c == '.' || c == '-' || c == '_')
|
||||||
|
{
|
||||||
return Err(format!(
|
return Err(format!(
|
||||||
"{} contains invalid characters — only alphanumeric, '.', '-', '_' are allowed",
|
"{} contains invalid characters — only alphanumeric, '.', '-', '_' are allowed",
|
||||||
field
|
field
|
||||||
@ -709,7 +712,8 @@ pub async fn create_proxmox_vm(
|
|||||||
.split_once(':')
|
.split_once(':')
|
||||||
.map(|(store, path)| {
|
.map(|(store, path)| {
|
||||||
!store.is_empty()
|
!store.is_empty()
|
||||||
&& !store.contains(|c: char| !c.is_ascii_alphanumeric() && c != '-' && c != '_')
|
&& !store
|
||||||
|
.contains(|c: char| !c.is_ascii_alphanumeric() && c != '-' && c != '_')
|
||||||
&& path.starts_with("iso/")
|
&& path.starts_with("iso/")
|
||||||
&& !path.contains(",")
|
&& !path.contains(",")
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user