-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Login not working after upgrading to 22.2.8/23.0.5 from 22.2.7 (LDAP/External Storage/SessionCredentials) #32598
Comments
I looked into the file "/var/www/nextcloud/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php" and added the following just before line 60: error_log($storage); After trying to login (v23.0.5), the log contains the literal string: *** sensitive parameter replaced *** |
Trying this with the working v22.2.7 version I get the exception: error_log() expects parameter 1 to be string, object given at /var/www/nextcloud/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php#60 which is expected, as the variable needs to be an object and not a string like with the later versions. |
After updating to 23.0.5, I had the same issue: {"reqId":"UpqVCncBIbSS3DQxF6mD","level":3,"time":"May 27, 2022 23:18:51","remoteAddr":"192.168.1.1","user":"Venel Valcourt","app":"index","method":"POST","url":"/index.php/login","message":"Call to a member function setBackendOption() on string in file '/volume1/web/nextcloud/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php' line 60","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53","version":"24.0.1.1","exception":{"Exception":"Exception","Message":"Call to a member function setBackendOption() on string in file '/volume1/web/nextcloud/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php' line 60","Code":0,"Trace":[{"file":"/volume1/web/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OC\Core\Controller\LoginController"},"tryLogin"]},{"file":"/volume1/web/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OC\Core\Controller\LoginController","tryLogin",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"core.login.tryLogin"}]},{"file":"/volume1/web/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\Route\Router","type":"->","args":["/login"]},{"file":"/volume1/web/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":165,"Previous":{"Exception":"Error","Message":"Call to a member function setBackendOption() on string","Code":0,"Trace":[{"file":"/volume1/web/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php","line":88,"function":"manipulateStorageConfig","class":"OCA\Files_External\Lib\Auth\Password\SessionCredentials","type":"->","args":["*** sensitive parameter replaced "," sensitive parameter replaced "]},{"file":"/volume1/web/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php","line":124,"function":"prepareStorageConfig","class":"OCA\Files_External\Config\ConfigAdapter","type":"->","args":[" sensitive parameter replaced "," sensitive parameter replaced "]},{"function":"OCA\Files_External\Config\{closure}","class":"OCA\Files_External\Config\ConfigAdapter","type":"->","args":[" sensitive parameters replaced "]},{"file":"/volume1/web/nextcloud/apps/files_external/lib/Config/ConfigAdapter.php","line":122,"function":"array_map","args":[{"class":"Closure"},{"1":{"class":"OCA\Files_External\Lib\StorageConfig"},"2":{"class":"OCA\Files_External\Lib\StorageConfig"}}]},{"file":"/volume1/web/nextcloud/lib/private/Files/Config/MountProviderCollection.php","line":124,"function":"getMountsForUser","class":"OCA\Files_External\Config\ConfigAdapter","type":"->","args":[" sensitive parameter replaced ",{"class":"OC\Files\Storage\StorageFactory"}]},{"file":"/volume1/web/nextcloud/lib/private/Files/SetupManager.php","line":213,"function":"addMountForUser","class":"OC\Files\Config\MountProviderCollection","type":"->","args":[" sensitive parameter replaced ",{"class":"OC\Files\Mount\Manager"},{"class":"Closure"}]},{"file":"/volume1/web/nextcloud/lib/private/Files/SetupManager.php","line":302,"function":"OC\Files\{closure}","class":"OC\Files\SetupManager","type":"->","args":[" sensitive parameters replaced "]},{"file":"/volume1/web/nextcloud/lib/private/Files/SetupManager.php","line":214,"function":"setupForUserWith","class":"OC\Files\SetupManager","type":"->","args":[" sensitive parameter replaced ",{"class":"Closure"}]},{"file":"/volume1/web/nextcloud/lib/private/Files/Filesystem.php","line":379,"function":"setupForUser","class":"OC\Files\SetupManager","type":"->","args":[" sensitive parameter replaced "]},{"file":"/volume1/web/nextcloud/lib/private/Cache/File.php","line":57,"function":"initMountPoints","class":"OC\Files\Filesystem","type":"::","args":[" sensitive parameter replaced "]},{"file":"/volume1/web/nextcloud/lib/private/Cache/File.php","line":178,"function":"getStorage","class":"OC\Cache\File","type":"->","args":[]},{"file":"/volume1/web/nextcloud/lib/base.php","line":831,"function":"gc","class":"OC\Cache\File","type":"->","args":[]},{"function":"{closure}","class":"OC","type":"::","args":[" sensitive parameters replaced "]},{"file":"/volume1/web/nextcloud/lib/private/Hooks/EmitterTrait.php","line":106,"function":"call_user_func_array","args":[{"class":"Closure"},[" sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"/volume1/web/nextcloud/lib/private/Hooks/PublicEmitter.php","line":40,"function":"emit","class":"OC\Hooks\BasicEmitter","type":"->","args":["\OC\User","postLogin",[" sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"/volume1/web/nextcloud/lib/private/User/Session.php","line":400,"function":"emit","class":"OC\Hooks\PublicEmitter","type":"->","args":["\OC\User","postLogin",[" sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "," sensitive parameter replaced "]]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php","line":44,"function":"completeLogin","class":"OC\User\Session","type":"->","args":[" sensitive parameters replaced "]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\Authentication\Login\CompleteLoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php","line":60,"function":"processNextOrFinishSuccessfully","class":"OC\Authentication\Login\ALoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\Authentication\Login\LoggedInCheckCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\Authentication\Login\ALoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\Authentication\Login\EmailLoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php","line":54,"function":"processNextOrFinishSuccessfully","class":"OC\Authentication\Login\ALoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\Authentication\Login\UidLoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":58,"function":"processNextOrFinishSuccessfully","class":"OC\Authentication\Login\ALoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":40,"function":"process","class":"OC\Authentication\Login\UserDisabledCheckCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php","line":53,"function":"processNextOrFinishSuccessfully","class":"OC\Authentication\Login\ALoginCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/Authentication/Login/Chain.php","line":108,"function":"process","class":"OC\Authentication\Login\PreLoginHookCommand","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/core/Controller/LoginController.php","line":329,"function":"process","class":"OC\Authentication\Login\Chain","type":"->","args":[{"class":"OC\Authentication\Login\LoginData"}]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"tryLogin","class":"OC\Core\Controller\LoginController","type":"->","args":[" sensitive parameters replaced ***"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OC\Core\Controller\LoginController"},"tryLogin"]},{"file":"/volume1/web/nextcloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OC\Core\Controller\LoginController"},"tryLogin"]},{"file":"/volume1/web/nextcloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OC\Core\Controller\LoginController","tryLogin",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"core.login.tryLogin"}]},{"file":"/volume1/web/nextcloud/lib/base.php","line":1023,"function":"match","class":"OC\Route\Router","type":"->","args":["/login"]},{"file":"/volume1/web/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/volume1/web/nextcloud/apps/files_external/lib/Lib/Auth/Password/SessionCredentials.php","Line":60},"CustomMessage":"--"}} If you have any solutions, I'm a taker. Thanks ! |
Hi, |
Hi, same issue here after upgrade to NC23.0.5; temporary solved by editing:
Best Regards, |
Dear Mauro, |
Su solución nos permitió resolver este error |
@ChristophWurst since you commited the breaking change 69f5f01, can you have a look? |
69f5f01 only changes the logging. How is that the breaking change? |
@ChristophWurst the other three people in this issue thread reverted your change and it worked again after, so it's safe to say that this change is the problem here. Regarding the reason I can only speculate because I don't know the code but based on our observations:
|
This doesn't fully make sense yet but if it helps we can remove logging the exception. I assume logging the exception message is still OK. |
PR works for me, thx! |
works for me |
Bug description
We have a working nextcloud instance at version 22.2.7 with php7.3.
LDAP against a samba4 AD domain is used for user authentication.
SMB External Storage with Session Credentials is used.
After the upgrade to 22.2.8 (and for testing 23.0.5) the login won't work any more for all user types (ldap and root user).
The raised exceptions are listed in the Nextcloud Logs section.
Steps to reproduce
Expected behavior
login still works after the upgrade
Installation method
Manual installation
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
no
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
The text was updated successfully, but these errors were encountered: