Problem/Motivation
For a reason I ignore, a certain google account I use for test is always tried to be linked with my admin user 1 account. What is prohibited by default settings. It works if I disable "Disable Social Auth login for administrator" checkbox. Of course this is not the point.
To be complete
- My user 1 has nothing to do with that gmail test account -> username, display name or email addresses are completely different
- Recovery email address of the gmail account has nothing to do with drupal user1 email address
- There is no trace of any prior user that had same email address. I even checked in the MySQL *users* tables
- I tested with 2 other gmail accounts, they work fine
recent log shows this :
Type php
Date Thursday, November 19, 2020 - 11:37
User Anonymous (not verified)
Location http://teej.duckdns.org:81/user/login/google
Referrer http://teej.duckdns.org:81/
Message Notice: Trying to access array offset on value of type null in Drupal\social_auth_google\Plugin\Network\GoogleAuth->initSdk() (line 62 of C:\xampp\htdocs\ScoutBnB2\web\modules\contrib\social_auth_google\src\Plugin\Network\GoogleAuth.php)
#0 C:\xampp\htdocs\ScoutBnB2\web\core\includes\bootstrap.inc(301): _drupal_error_handler_real(8, 'Trying to acces...', 'C:\\xampp\\htdocs...', 62, Array)
#1 C:\xampp\htdocs\ScoutBnB2\web\modules\contrib\social_auth_google\src\Plugin\Network\GoogleAuth.php(62): _drupal_error_handler(8, 'Trying to acces...', 'C:\\xampp\\htdocs...', 62, Array)
#2 C:\xampp\htdocs\ScoutBnB2\web\modules\contrib\social_api\src\Plugin\NetworkBase.php(151): Drupal\social_auth_google\Plugin\Network\GoogleAuth->initSdk()
#3 C:\xampp\htdocs\ScoutBnB2\web\modules\contrib\social_auth\src\Controller\OAuth2ControllerBase.php(167): Drupal\social_api\Plugin\NetworkBase->getSdk()
#4 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\social_auth\Controller\OAuth2ControllerBase->Drupal\social_auth\Controller\{closure}()
#5 C:\xampp\htdocs\ScoutBnB2\web\modules\contrib\social_auth\src\Controller\OAuth2ControllerBase.php(208): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#6 [internal function]: Drupal\social_auth\Controller\OAuth2ControllerBase->redirectToProvider()
#7 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#8 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\Render\Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#10 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#11 C:\xampp\htdocs\ScoutBnB2\vendor\symfony\http-kernel\HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 C:\xampp\htdocs\ScoutBnB2\vendor\symfony\http-kernel\HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#13 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\StackMiddleware\Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#15 C:\xampp\htdocs\ScoutBnB2\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#16 C:\xampp\htdocs\ScoutBnB2\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 C:\xampp\htdocs\ScoutBnB2\web\core\modules\page_cache\src\StackMiddleware\PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 C:\xampp\htdocs\ScoutBnB2\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 C:\xampp\htdocs\ScoutBnB2\web\core\lib\Drupal\Core\DrupalKernel.php(705): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 C:\xampp\htdocs\ScoutBnB2\web\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#23 {main}
.
Severity Notice
Hostname 192.168.1.1
Operations I don't think it is related
(Running Drupal 9.0.7)
Steps to reproduce
Simply by trying to login with that gmail account
Proposed resolution
?
Remaining tasks
?
User interface changes
Don't think so
Comments
Comment #2
civette commentedComment #3
sicojweb commentedI can confirm this issue.
If I try to login using @gmail account seeting "Disable Social Auth login for Admin or Role Administrator"
i can get into Drupal Admin Panel as Administrator!
I can see in Report -> Recent Messages the following error:
Notice: Trying to access array offset on value of type null in Drupal\social_auth_google\Plugin\Network\GoogleAuth->initSdk()
The same error message related in issue 3154225.
But I get this message trying to apply this patch:
Could not apply patch! Skipping.
Drupal version : 8.9.10
PHP version : 7.4
PHP OS : Linux
Drush version : 10.3.6
Any help will be very apreciated!
Thks
Comment #4
avpadernoComment #5
wellsComment #6
wellsComment #7
klemendev commentedIsn't this a major security issue?