- Issue created by @drupalbubb
- Status changed to Closed: duplicate
12 months ago 11:09am 22 July 2024 - 🇩🇪Germany drupalbubb
This seems to be a problem from mail login: See 🐛 Error with new version of module "mail_login" v4.0.0 for Drupal ^10.3 || ^11 RTBC
- Status changed to Active
12 months ago 3:27pm 22 July 2024 - 🇩🇪Germany drupalbubb
Re-opening. The patch from the related issue #3462452 seems to be the wrong way. And the wrong place. I am not sure, but I read in the error message "UserAuthInterface" instead of "UserAuthenticationInterface". Sounds wrong, deprecated.
- 🇸🇮Slovenia LUTi
I've managed to run Security Review with the following patch:
diff -up modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php~ modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php --- modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php~ 2024-07-10 19:55:58.848825234 +0200 +++ modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php 2024-07-23 21:24:40.015774057 +0200 @@ -14,7 +14,7 @@ use Drupal\Core\Plugin\ContainerFactoryP use Drupal\security_review\CheckResult; use Drupal\security_review\SecurityCheckBase; use Drupal\user\Entity\User; -use Drupal\user\UserAuthInterface; +use Drupal\user\UserAuthenticationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -53,9 +53,9 @@ class NamePasswords extends SecurityChec /** * Drupal's user authentication service. * - * @var \Drupal\user\UserAuthInterface + * @var \Drupal\user\UserAuthenticationInterface */ - protected UserAuthInterface $userAuth; + protected UserAuthenticationInterface $userAuth; /** * {@inheritdoc} @@ -97,7 +97,7 @@ class NamePasswords extends SecurityChec $users = User::loadMultiple($ids); $findings = []; foreach ($users as $user) { - if ($this->userAuth->authenticate($user->getDisplayName(), $user->getDisplayName())) { + if ($this->userAuth->authenticateAccount($this->userAuth->lookupAccount($user->getDisplayName()), $user->getDisplayName())) { $findings[] = $user->getDisplayName(); }
- 🇩🇪Germany drupalbubb
Due to the fact, that disabling Security Review shows the same error, i tried the patch. I copied it into a file and configured composer-patches to apply it.
But the patch is faulty, e.g.@@ -14,7 +14,7 @@ use Drupal\Core\Plugin\ContainerFactoryP
And there is a file not found, too. With my poor knowlegde I can't say if it is the non existend tilde fileNamePasswords.php~
or a double path componentmodules/contrib/security_review/
or both. - 🇫🇷France erwangel
I came to the same error while uninstalling the deprecated module (in D10.3.1) layout_builder_expose_all_field_blocks with drush pm:uninstall.
TypeError: Cannot assign Drupal\mail_login\AuthDecorator to property Drupal\security_review\Plugin\SecurityCheck\NamePasswords::$userAuth of type Drupal\user\UserAuthInterface in Drupal\security_review\Plugin\SecurityCheck\NamePasswords::create() (line 67 of /path_to_site/web/modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php) #0 /path_to_site/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(21): Drupal\security_review\Plugin\SecurityCheck\NamePasswords::create()
Then while accessing admin/config/security-review: WSOD with the following
TypeError: Cannot assign Drupal\mail_login\AuthDecorator to property Drupal\security_review\Plugin\SecurityCheck\NamePasswords::$userAuth of type Drupal\user\UserAuthInterface in Drupal\security_review\Plugin\SecurityCheck\NamePasswords::create() (line 67 of modules/contrib/security_review/src/Plugin/SecurityCheck/NamePasswords.php).
No problem to access admin/config/people/mail-login
- Status changed to Needs work
11 months ago 7:44am 23 August 2024 - 🇩🇪Germany drupalbubb
Mail Login 4.0.3 solved my main issue. I keep this issue open, because the deprecated code seems not to be targeted anywhere else.
- 🇺🇸United States smustgrave
Been loosely following but was this a bug in mail auth?
- 🇩🇪Germany drupalbubb
@smustgrave, please have a look at
src/Plugin/SecurityCheck/NamePasswords.php
if the use ofUserAuthInterface
is deprecated (like my coding skills, haha).
If yes, we should have a new issue, this one was originaly about Mail Login module. And have a look at #4.
After that close this one. Thanks. - 🇺🇸United States smustgrave
Will have to start a new branch. UserAuthInterface doesn't appear to be deprecated yet but says it could be in D11 but the new service userAuthenticationInterface was only added in 10.3 so that change could break those running on lower then 10.3
-
smustgrave →
committed d6e693e6 on 3.1.x
Issue #3463067 by drupalbubb, erwangel, smustgrave, LUTi: Problem with...
-
smustgrave →
committed d6e693e6 on 3.1.x
- 🇺🇸United States smustgrave
Started a new branch, will try and plan a release in the next week or so.
- Status changed to Fixed
8 months ago 10:59pm 4 November 2024 Automatically closed - issue fixed for 2 weeks with no activity.