Fix input sanitization

This commit is contained in:
Steffen Lange 2019-04-11 17:24:26 +02:00 committed by GitHub
parent 2e0e9f49f2
commit 1439175616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,7 +72,7 @@ function lookupCaller($number) {
header('Content-Type: text/xml; charset=utf-8'); header('Content-Type: text/xml; charset=utf-8');
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n"; echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n";
if (isset($_GET['hm']) && is_numeric($_GET['hm'])) { if (isset($_GET['hm']) && preg_match('/^\d+$/', $_GET['hm'])) {
$caller = lookupCaller($_GET['hm']); $caller = lookupCaller($_GET['hm']);
if (is_array($caller)) if (is_array($caller))
printResponse($caller); printResponse($caller);