diff options
author | jim-p <jimp@pfsense.org> | 2014-02-17 16:09:43 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-02-17 16:09:43 -0500 |
commit | ad6e7cb89edbb0849eda4516cb0976fb877bc397 (patch) | |
tree | 3665028bcc023d4bd44c8654a2b6371339267141 /config | |
parent | b23398b68fabefebd8b9c4715b81772df7c6228c (diff) | |
download | pfsense-packages-ad6e7cb89edbb0849eda4516cb0976fb877bc397.tar.gz pfsense-packages-ad6e7cb89edbb0849eda4516cb0976fb877bc397.tar.bz2 pfsense-packages-ad6e7cb89edbb0849eda4516cb0976fb877bc397.zip |
Input validation for arping and escaping. Fixes #3462
Diffstat (limited to 'config')
-rw-r--r-- | config/arping/arping.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/arping/arping.inc b/config/arping/arping.inc index be21a790..0054adf0 100644 --- a/config/arping/arping.inc +++ b/config/arping/arping.inc @@ -35,7 +35,11 @@ function arping_package_reinstall() { } function arping_package_php_command() { - system("arping -c3 " . $_POST['hostip']); + require_once("util.inc"); + if (is_ipaddr($_POST['hostip']) || is_hostname($_POST['hostip']) || is_macaddr($_POST['hostip'])) + system("arping -c3 " . escapeshellarg($_POST['hostip'])); + else + echo "Invalid input. Supplied address must be a valid IP or MAC address."; exit; } |