Merge pull request #40 from parnic-sks/bugfix/case-sensitivity

Fixed failing oauth if username case changed
This commit is contained in:
Denis CLAVIER 2020-04-30 20:24:16 +02:00 committed by GitHub
commit 2a17782f9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ if (empty($_POST)) {
// print the authorization code if the user has authorized your client // print the authorization code if the user has authorized your client
$is_authorized = ($_POST['authorized'] === 'Authorize'); $is_authorized = ($_POST['authorized'] === 'Authorize');
$server->handleAuthorizeRequest($request, $response, $is_authorized,$_SESSION['uid']); $server->handleAuthorizeRequest($request, $response, $is_authorized,strtolower($_SESSION['uid']));
if ($is_authorized) if ($is_authorized)
{ {

View File

@ -33,7 +33,7 @@ else
// Remove every html tag and useless space on username (to prevent XSS) // Remove every html tag and useless space on username (to prevent XSS)
$user=strip_tags(trim($_POST['user'])); $user=strip_tags(trim($_POST['user']));
$user=$_POST['user']; $user=strtolower($_POST['user']);
$password=$_POST['password']; $password=$_POST['password'];
// Open a LDAP connection // Open a LDAP connection