diff options
-rw-r--r-- | Auth/OpenID/URINorm.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Auth/OpenID/URINorm.php b/Auth/OpenID/URINorm.php index c051b55..32e8458 100644 --- a/Auth/OpenID/URINorm.php +++ b/Auth/OpenID/URINorm.php @@ -93,7 +93,17 @@ function Auth_OpenID_pct_encoded_replace_unreserved($mo) function Auth_OpenID_pct_encoded_replace($mo) { - return chr(intval($mo[1], 16)); + $code = intval($mo[1], 16); + + // Prevent request splitting by ignoring newline and space characters + if($code === 0xA || $code === 0xD || $code === ord(' ')) + { + return $mo[0]; + } + else + { + return chr($code); + } } function Auth_OpenID_remove_dot_segments($path) |