X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=extlib%2FAuth%2FOpenID%2FPAPE.php;fp=extlib%2FAuth%2FOpenID%2FPAPE.php;h=f08ca8bd0b21e358e976d790bb11af91c718fb9e;hb=2d920e05d563c9c327cf235b31ce18dfc4a83870;hp=62cba8a912d46cf6691d3920bab55966d9cde10b;hpb=923d9ef71ce49bfa55460bf42acb8a35bf3e84be;p=quix0rs-gnu-social.git diff --git a/extlib/Auth/OpenID/PAPE.php b/extlib/Auth/OpenID/PAPE.php index 62cba8a912..f08ca8bd0b 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