MDL-12793 PARAM_HOST incorrect cleaning
This commit is contained in:
+1
-1
@@ -452,7 +452,7 @@ function clean_param($param, $type) {
|
||||
return ereg_replace('/(\./)+', '/', $param);
|
||||
|
||||
case PARAM_HOST: // allow FQDN or IPv4 dotted quad
|
||||
preg_replace('/[^\.\d\w-]/','', $param ); // only allowed chars
|
||||
$param = preg_replace('/[^\.\d\w-]/','', $param ); // only allowed chars
|
||||
// match ipv4 dotted quad
|
||||
if (preg_match('/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/',$param, $match)){
|
||||
// confirm values are ok
|
||||
|
||||
Reference in New Issue
Block a user