在system()函数中使用$ _GET-安全性问题

问题描述 投票:0回答:1

所以我们说下面的代码:

<?php
$str = addslashes($_GET['str']);
$cmd = 'sometool "'.$str.'"';
system($cmd);
?>

安全吗?我能以某种方式摆脱双引号吗? linux中的操作系统。

纯粹是理论上的考虑。我不在我的代码中使用它;)

php security
1个回答
0
投票
escapeshellarg
© www.soinside.com 2019 - 2024. All rights reserved.