diff options
author | Andrey Andreev <narf@devilix.net> | 2014-01-25 18:23:47 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-01-25 18:23:47 +0100 |
commit | b69103e8ab0c646d01f5e97ef6a255293de1e60e (patch) | |
tree | 0fb3bc4b7ff70a1071bee0797c6d8a57c0a9f62d /system/core | |
parent | adf3bde5f8a196013acc615e5bfeedd0ef6417b8 (diff) |
Fix CI_Security::_remove_evil_attributes() being way too aggressive
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Security.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/core/Security.php b/system/core/Security.php index 93613cc78..15cb37620 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -683,7 +683,7 @@ class CI_Security { $attribs = array(); // find occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes) - preg_match_all('/('.implode('|', $evil_attributes).')\s*=\s*(\042|\047)([^\\2]*?)(\\2)/is', $str, $matches, PREG_SET_ORDER); + preg_match_all('/\W('.implode('|', $evil_attributes).')\s*=\s*(\042|\047)([^\\2]*?)(\\2)/is', $str, $matches, PREG_SET_ORDER); foreach ($matches as $attr) { @@ -691,7 +691,7 @@ class CI_Security { } // find occurrences of illegal attribute strings without quotes - preg_match_all('/('.implode('|', $evil_attributes).')\s*=\s*([^\s>]*)/is', $str, $matches, PREG_SET_ORDER); + preg_match_all('/\W('.implode('|', $evil_attributes).')\s*=\s*([^\s>]*)/is', $str, $matches, PREG_SET_ORDER); foreach ($matches as $attr) { |