Merge pull request #40 from parnic-sks/bugfix/case-sensitivity
Fixed failing oauth if username case changed
This commit is contained in:
commit
2a17782f9f
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue