### Steps to reproduce
1. Install Nextcloud v26 (password policy app v1.16 is a…lso active because of that), user_saml v5.1.2, configure saml auth
2. Log in via SAML
### Expected behaviour
Authentication should work.
### Actual behaviour
I get an error 500. And the following error in the phpfpm log:
```
{
"Exception": "TypeError",
"Message": "OCA\\Password_Policy\\ComplianceService::entryControl(): Argument #2 ($password) must be of type string, null given, called in /nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/apps/password_policy/lib/Listener/BeforeUserLoggedInEventListener.php on line 45",
"Code": 0,
"Trace": [
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/apps/password_policy/lib/Listener/BeforeUserLoggedInEventListener.php",
"line": 45,
"function": "entryControl",
"class": "OCA\\Password_Policy\\ComplianceService",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/private/EventDispatcher/ServiceEventListener.php",
"line": 86,
"function": "handle",
"class": "OCA\\Password_Policy\\Listener\\BeforeUserLoggedInEventListener",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 251,
"function": "__invoke",
"class": "OC\\EventDispatcher\\ServiceEventListener",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line": 73,
"function": "callListeners",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/private/EventDispatcher/EventDispatcher.php",
"line": 87,
"function": "dispatch",
"class": "Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/private/EventDispatcher/EventDispatcher.php",
"line": 99,
"function": "dispatch",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/private/legacy/OC_User.php",
"line": 192,
"function": "dispatchTyped",
"class": "OC\\EventDispatcher\\EventDispatcher",
"type": "->"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/private/legacy/OC_User.php",
"line": 243,
"function": "loginWithApache",
"class": "OC_User",
"type": "::",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/base.php",
"line": 1122,
"function": "handleApacheAuth",
"class": "OC_User",
"type": "::"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/lib/base.php",
"line": 1044,
"function": "handleLogin",
"class": "OC",
"type": "::"
},
{
"file": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/index.php",
"line": 36,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/nix/store/z8bpxwl8h4ckxvbh91ky4jxr2fgmr0gs-nextcloud-26.0.0/apps/password_policy/lib/ComplianceService.php",
"Line": 90,
"CustomMessage": "--"
}
```
The issue can be solved by deactivating the password policy app. Given Nextcloud doesn't have to deal with passwords here because of SAML it should probably made sure that the app is not touched at all by this.
### Server configuration
**Operating system**: NixOS 22.11
**Web server:** nginx 1.22
**Database:** postgresql 15
**PHP version:** 8.1.16
**Nextcloud version:** 26.0.0
**Where did you install Nextcloud from:** NixOS
**List of activated apps:**
```
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
Enabled:
- activity: 2.18.0
- calendar: 3.4.3
- circles: 26.0.0
- cloud_federation_api: 1.9.0
- comments: 1.16.0
- contacts: 4.2.0
- contactsinteraction: 1.7.0
- cospend: 1.5.8
- dashboard: 7.6.0
- dav: 1.25.0
- federatedfilesharing: 1.16.0
- federation: 1.16.0
- files: 1.21.1
- files_external: 1.18.0
- files_pdfviewer: 2.7.0
- files_rightclick: 1.5.0
- files_sharing: 1.18.0
- files_trashbin: 1.16.0
- files_versions: 1.19.1
- firstrunwizard: 2.15.0
- logreader: 2.11.0
- lookup_server_connector: 1.14.0
- maps: 1.0.0
- nextcloud_announcements: 1.15.0
- notifications: 2.14.0
- oauth2: 1.14.0
- photos: 2.2.0
- privacy: 1.10.0
- provisioning_api: 1.16.0
- recommendations: 1.5.0
- related_resources: 1.1.0-alpha1
- serverinfo: 1.16.0
- settings: 1.8.0
- sharebymail: 1.16.0
- support: 1.9.0
- survey_client: 1.14.0
- systemtags: 1.16.0
- text: 3.7.2
- theming: 2.1.1
- twofactor_backupcodes: 1.15.0
- updatenotification: 1.16.0
- user_ldap: 1.16.0
- user_saml: 5.1.2
- user_status: 1.6.0
- viewer: 1.10.0
- weather_status: 1.6.0
- workflowengine: 2.8.0
Disabled:
- admin_audit: 1.16.0
- bruteforcesettings: 2.6.0
- encryption: 2.14.0
- password_policy: 1.16.0 (installed 1.16.0)
- suspicious_login: 4.4.0
- twofactor_totp: 8.0.0-alpha.0
```
**Nextcloud configuration:**
```{
"system": {
"apps_paths": [
{
"path": "\/var\/lib\/nextcloud\/nix-apps",
"url": "\/nix-apps",
"writable": false
},
{
"path": "\/var\/lib\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/lib\/nextcloud\/store-apps",
"url": "\/store-apps",
"writable": true
}
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"skeletondirectory": "",
"log_type": "syslog",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "26.0.0.11",
"overwrite.cli.url": "http:\/\/localhost",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"loglevel": "1",
"maintenance": false,
"logfile": "\/var\/log\/nextcloud.log",
"log_level": "2",
"theme": "",
"app_install_overwrite": [
"calendar",
"user_saml",
"contacts"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"default_phone_region": "DE",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"session_lifetime": 2419200,
"profile.enabled": false,
"appstoreenabled": false,
"memcache": {
"distributed": "\\OC\\Memcache\\Redis",
"local": "\\OC\\Memcache\\Redis",
"locking": "\\OC\\Memcache\\Redis"
},
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"trusted_domains": [
"<redacted>"
]
}
}
```
### Client configuration
irrelevant, server issue
### Logs
#### Nextcloud log (data/owncloud.log)
see above
#### Browser log
n/a