Skip to content

Commit

Permalink
CI_Security: URL-decode until possible
Browse files Browse the repository at this point in the history
  • Loading branch information
narfbg committed Feb 10, 2014
1 parent f7f9dca commit 29e1264
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system/core/Security.php
Expand Up @@ -359,7 +359,11 @@ public function xss_clean($str, $is_image = FALSE)
*
* Note: Use rawurldecode() so it does not remove plus signs
*/
$str = rawurldecode($str);
do
{
$str = rawurldecode($str);
}
while (preg_match('/%[0-9a-f]{2,}/i', $str));

/*
* Convert character entities to ASCII
Expand Down

0 comments on commit 29e1264

Please sign in to comment.