Internal Server Error after upgrade to 25.0.6 when using SAML SSO

After upgrading to Nextcloud 25.0.6 it is not possible to authenticate with SAML SSO.

After a successful SAML login, nextcloud will show in the browser a internal server error.

The issue seems to be the same as

Log file message:

"message":"OCA\\Password_Policy\\ComplianceService::entryControl(): Argument #2 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/password_policy/lib/Listener/BeforeUserLoggedInEventListener.php on line 45","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Edg/112.0.1722.58","version":"25.0.6.1","exception":{"Exception":"TypeError","Message":"OCA\\Password_Policy\\ComplianceService::entryControl(): Argument #2 ($password) must be of type string, null given, called in /var/www/html/nextcloud/apps/password_policy/lib/Listener/BeforeUserLoggedInEventListener.php on line 45","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/password_policy/lib/Listener/BeforeUserLoggedInEventListener.php","line":45,"function":"entryControl","class":"OCA\\Password_Policy\\ComplianceService","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Password_Policy\\Listener\\BeforeUserLoggedInEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_User.php","line":192,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_User.php","line":243,"function":"loginWithApache","class":"OC_User","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/base.php","line":1103,"function":"handleApacheAuth","class":"OC_User","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1037,"function":"handleLogin","class":"OC","type":"::"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/password_policy/lib/ComplianceService.php","Line":90,"CustomMessage":"--"}}

Nextcloud version (eg, 20.0.5): 25.0.6
Operating system and version (eg, Ubuntu 20.04): Debian 11.6
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.56
PHP version (eg, 7.4): 8.0.28

When I disable the Password Policy app the login is working.

php occ app:disable password_policy
1 Like