TWSD-1416 : While creating VA, getting "System error occurred" message.

Review Request #1450 — Created March 18, 2026 and submitted

stevenku
AVX2
rel_avx_2_7_6
TWSD-1416
bsrivalli, ngurunathan, wli

Add filename validation for VA image import to prevent invalid characters in disk name.

Previously, filenames extracted from URL could contain special shell characters such as [], (), {}, *, ?, $, etc. These characters may be interpreted by the shell when executing system() commands (e.g., mv), leading to unexpected behavior or command failure.

This patch extracts the disk filename from the URL and validates it using is_invalid_image_name() to reject unsupported characters before proceeding.

Only filenames containing ("a-z","A-Z" ,"0-9" ,"." ,"_" ,"-" ) are allowed.

AN(config)#va image "apv_10_7_0_21" "file://Rel_APV_10_7_0_21[1].qcow2" "qcow2" "file://metadata.ini"

VA data downloading...

Invalid image file name "Rel_APV_10_7_0_21[1].qcow2" in the URL! Allowed characters: "a-z", "A-Z", "0-9", ".", "_", "-"

ngurunathan
  1. Ship It!
  2. 
      
wli
  1. Ship It!
  2. 
      
stevenku
stevenku
bsrivalli
  1. Ship It!
  2. 
      
stevenku
Review request changed

Status: Closed (submitted)

Loading...