mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 07:32:32 +01:00
Fix regression on auth login.
This commit is contained in:
@@ -114,7 +114,7 @@ if ($state) {
|
||||
|
||||
// Add a test to check that the state parameter is provided into URL when we make the first call to ask the redirect or when we receive the callback
|
||||
// but not when callback was ok and we recall the page
|
||||
if ($action != 'delete' && !GETPOSTINT('afteroauthloginreturn') && (empty($statewithscopeonly) || empty($requestedpermissionsarray))) {
|
||||
if ($action != 'delete' && !GETPOST('afteroauthloginreturn') && (empty($statewithscopeonly) || empty($requestedpermissionsarray))) {
|
||||
dol_syslog("state or statewithscopeonly and/or requestedpermissionsarray are empty");
|
||||
setEventMessages($langs->trans('ScopeUndefined'), null, 'errors');
|
||||
if (empty($backtourl)) {
|
||||
@@ -372,7 +372,7 @@ if (!GETPOST('code')) {
|
||||
// If call back to this url was for a OAUTH2 login
|
||||
if ($forlogin) {
|
||||
// _SESSION['googleoauth_receivedlogin'] has been set to the key to validate the next test by function_googleoauth(), so we can make the redirect
|
||||
$backtourl .= '?actionlogin=login&afteroauthloginreturn=1&mainmenu=home'.($username ? '&username='.urlencode($username) : '').'&token='.newToken();
|
||||
$backtourl .= '?actionlogin=login&afteroauthloginreturn=google&mainmenu=home'.($username ? '&username='.urlencode($username) : '').'&token='.newToken();
|
||||
if (!empty($tmparray['entity'])) {
|
||||
$backtourl .= '&entity='.$tmparray['entity'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user