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