mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 23:53:48 +08:00
Sanitize inputs to eval() (#6745)
This commit is contained in:
@ -160,8 +160,11 @@ run_cmd="deepspeed.pt \
|
||||
--master_port ${master_port}
|
||||
${BingBertSquad_script} ${other_args} ${squad_args}"
|
||||
|
||||
echo ${run_cmd}
|
||||
eval ${run_cmd}
|
||||
# Sanitize input before running eval()
|
||||
safe_cmd=$(printf '%q' "$run_cmd")
|
||||
|
||||
echo ${safe_cmd}
|
||||
eval ${safe_cmd}
|
||||
|
||||
set +x
|
||||
|
||||
|
Reference in New Issue
Block a user