diff options
Diffstat (limited to 'extlib/Auth/OpenID/PAPE.php')
-rw-r--r-- | extlib/Auth/OpenID/PAPE.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/extlib/Auth/OpenID/PAPE.php b/extlib/Auth/OpenID/PAPE.php index 62cba8a91..f08ca8bd0 100644 --- a/extlib/Auth/OpenID/PAPE.php +++ b/extlib/Auth/OpenID/PAPE.php @@ -21,7 +21,7 @@ define('PAPE_AUTH_PHISHING_RESISTANT', 'http://schemas.openid.net/pape/policies/2007/06/phishing-resistant'); define('PAPE_TIME_VALIDATOR', - '^[0-9]{4,4}-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]Z$'); + '/^[0-9]{4,4}-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]Z$/'); /** * A Provider Authentication Policy request, sent from a relying party * to a provider @@ -82,7 +82,7 @@ class Auth_OpenID_PAPE_Request extends Auth_OpenID_Extension { * Instantiate a Request object from the arguments in a checkid_* * OpenID message */ - function fromOpenIDRequest($request) + static function fromOpenIDRequest($request) { $obj = new Auth_OpenID_PAPE_Request(); $args = $request->message->getArgs(Auth_OpenID_PAPE_NS_URI); @@ -201,7 +201,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension { * @returns: A provider authentication policy response from the * data that was supplied with the id_res response. */ - function fromSuccessResponse($success_response) + static function fromSuccessResponse($success_response) { $obj = new Auth_OpenID_PAPE_Response(); @@ -262,7 +262,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension { $auth_time = Auth_OpenID::arrayGet($args, 'auth_time'); if ($auth_time !== null) { - if (ereg(PAPE_TIME_VALIDATOR, $auth_time)) { + if (preg_match(PAPE_TIME_VALIDATOR, $auth_time)) { $this->auth_time = $auth_time; } else if ($strict) { return false; @@ -287,7 +287,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension { } if ($this->auth_time !== null) { - if (!ereg(PAPE_TIME_VALIDATOR, $this->auth_time)) { + if (!preg_match(PAPE_TIME_VALIDATOR, $this->auth_time)) { return false; } @@ -298,4 +298,3 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension { } } -?>
\ No newline at end of file |