Permalink
Browse files

MDL-12793 PARAM_HOST incorrect cleaning; backported from MOODLE_19_ST…

…ABLE
  • Loading branch information...
1 parent abc597e commit e8b2de8d182c7a23041f5c80e7801869a3775c58 skodak committed Jan 1, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/moodlelib.php
View
@@ -416,7 +416,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

0 comments on commit e8b2de8

Please sign in to comment.