Trim user input where applicable

Signed-off-by: Jack'lul <jacklulcat@gmail.com>
This commit is contained in:
Jack'lul
2020-05-14 18:01:36 +02:00
parent 56990c5c34
commit e12ebcbd08
3 changed files with 17 additions and 14 deletions

View File

@@ -137,10 +137,10 @@ function addCustomDNSEntry($ip="", $domain="", $json_reply=true)
try
{
if(isset($_REQUEST['ip']))
$ip = $_REQUEST['ip'];
$ip = trim($_REQUEST['ip']);
if(isset($_REQUEST['domain']))
$domain = $_REQUEST['domain'];
$domain = trim($_REQUEST['domain']);
if (empty($ip))
return error("IP must be set");