From f70c0392758b397dfecd6febde152d5e210df127 Mon Sep 17 00:00:00 2001 From: Michael Gooden Date: Mon, 4 Mar 2013 17:31:59 +0200 Subject: [PATCH] Fix state parameter check typo --- src/OAuth2/AuthServer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OAuth2/AuthServer.php b/src/OAuth2/AuthServer.php index 995e1c75..f72ff446 100644 --- a/src/OAuth2/AuthServer.php +++ b/src/OAuth2/AuthServer.php @@ -291,8 +291,8 @@ class AuthServer throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'redirect_uri'), 0); } - if ($this->requireStateParam === true && is_null($authParams['redirect_uri'])) { - throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'redirect_uri'), 0); + if ($this->requireStateParam === true && is_null($authParams['state'])) { + throw new Exception\ClientException(sprintf(self::$exceptionMessages['invalid_request'], 'state'), 0); } // Validate client ID and redirect URI