server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: No login on webclient on 24.0.3.2

Open xundeenergie opened this issue 2 years ago • 1 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

I upgraded to 24.0.3.2 then upgraded the plugins. Everything worked perfect.

Today i wanted to login, and reached always the login-screen again. I tried it with Firefox on Linux, Chromium on Linux, Firefox on Android, Firefox-Klar on Android, every browser gives the same result.

My Users come from LDAP and i authenticated them with OpenID via keycloak. So i deactivated openid-app. -> Result is the same. I tried it also with local users -> Result is the same.

I'va also configured webauthn with a nitrokey. When i try to Login i get this in nextcloud log (occ log:watch) ` Debug no app in context OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException: CSRF check failed at .../Middleware/Security/SecurityMiddleware.php line 2022-08-06T21:19:40+02:00
215

                          0. lib/private/AppFramework/Middleware/MiddlewareDispatcher.php line 97                                                                                                              
                             OC\AppFramework\Middleware\Security\SecurityMiddleware->beforeController(                                                                                                         
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          1. lib/private/AppFramework/Http/Dispatcher.php line 125                                                                                                                             
                             OC\AppFramework\Middleware\MiddlewareDispatcher->beforeController(                                                                                                                
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          2. lib/private/AppFramework/App.php line 172                                                                                                                                         
                             OC\AppFramework\Http\Dispatcher->dispatch(                                                                                                                                        
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          3. lib/private/Route/Router.php line 298                                                                                                                                             
                             OC\AppFramework\App::main(                                                                                                                                                        
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          4. lib/base.php line 1023                                                                                                                                                            
                             OC\Route\Router->match(                                                                                                                                                           
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          5. index.php line 36                                                                                                                                                                 
                             OC::handleRequest(                                                                                                                                                                
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 

When i try to login with username and password, i get Debug no app in context OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException: Current user is not logged in at .../Middleware/Security/SecurityMiddleware.php line 2022-08-06T21:20:10+02:00 153

                          0. lib/private/AppFramework/Middleware/MiddlewareDispatcher.php line 97                                                                                                              
                             OC\AppFramework\Middleware\Security\SecurityMiddleware->beforeController(                                                                                                        
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          1. lib/private/AppFramework/Http/Dispatcher.php line 125                                                                                                                             
                             OC\AppFramework\Middleware\MiddlewareDispatcher->beforeController(                                                                                                                
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          2. lib/private/AppFramework/App.php line 172                                                                                                                                         
                             OC\AppFramework\Http\Dispatcher->dispatch(                                                                                                                                        
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          3. lib/private/Route/Router.php line 298                                                                                                                                             
                             OC\AppFramework\App::main(                                                                                                                                                        
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          4. lib/base.php line 1023                                                                                                                                                            
                             OC\Route\Router->match(                                                                                                                                                           
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 
                          5. index.php line 36                                                                                                                                                                 
                             OC::handleRequest(                                                                                                                                                                
                                                                                                                                                                                                               
                             )                                                                                                                                                                                 

`

BUT i can use the android-app and use my nextcloud via webdav (Gnome Online Accounts!!! and manually on commandline)

So i think it is a problem with the webfrontend.

Steps to reproduce

no idea how to reproduce it

Expected behavior

I want to login again

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Nginx

Database engine version

No response

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [X] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [X] Other

Configuration report

{                                                                                                                                                                                                                  
    "system": {                                                                                                                                                                                                    
        "simpleSignUpLink.shown": false,                                                                                                                                                                           
        "config_is_read_only": false,                                                                                                                                                                              
        "apps_paths": [                                                                                                                                                                                            
            {                                                                                                                                                                                                      
                "path": "\/var\/www\/nextcloud.schuerz.at\/apps",                                                                                                                                                  
                "url": "\/apps",                                                                                                                                                                                   
                "writable": false                                                                                                                                                                                  
            },                                                                                                                                                                                                     
            {                                                                                                                                                                                                      
                "path": "\/var\/www\/nextcloud.schuerz.at\/custom_apps",                                                                                                                                           
                "url": "\/custom_apps",                                                                                                                                                                            
                "writable": true                                                                                                                                                                                   
            }                                                                                                                                                                                                      
        ],                                                                                                                                                                                                         
        "memcache.local": "\\OC\\Memcache\\APCu",                                                                                                                                                                  
        "filelocking.enabled": "true",                                                                                                                                                                             
        "memcache.distributed": "\\OC\\Memcache\\Redis",                                                                                                                                                           
        "memcache.locking": "\\OC\\Memcache\\Redis",                                                                                                                                                               
        "redis": {                                                                                                                                                                                                 
            "host": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                               
            "port": 0,                                                                                                                                                                                             
            "dbindex": 0,                                                                                                                                                                                          
            "password": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                           
            "timeout": 1.5                                                                                                                                                                                         
        },                                                                                                                                                                                                         
        "instanceid": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                             
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                           
        "secret": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                                 
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",                                                                                                                                                        
        "trusted_domains": [
            "nextcloud.schuerz.at",
            "138.201.246.50"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.3.2",
        "overwrite.cli.url": "https:\/\/nextcloud.schuerz.at",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",                                                                                                                                                                                              
        "dbtableprefix": "oc_",                                                                                                                                                                                    
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "overwriteprotocol": "https",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "de_AT",
        "loglevel": "0",
        "logtimezone": "EUROPE\/VIENNA",
        "theme": "",
        "has_rebuilt_cache": true,
        "app_install_overwrite": [
            "ojsxc",
            "previewgenerator",
            "social",
            "uppush"
        ],
        "preview_max_x": "2048",
        "filesystem_check_changes": 1,
        "allow_user_to_change_display_name": false,
        "oidc_login_provider_url": "https:\/\/keycloak.schuerz.at\/auth\/realms\/master",
        "oidc_login_client_id": "nextcloud.schuerz.at",
        "oidc_login_client_secret": "***REMOVED SENSITIVE VALUE***",
        "oidc_login_auto_redirect": false,
        "oidc_login_logout_url": "https:\/\/keycloak.schuerz.at\/auth\/realms\/master\/protocol\/openid-connect\/logout?redirect_uri=https%3A%2F%2Fnextcloud.schuerz.at%2F",
        "oidc_login_end_session_redirect": false,
        "oidc_login_button_text": "Login mit OpenID",
        "oidc_login_hide_password_form": false,
        "oidc_login_use_id_token": false,
        "oidc_login_attributes": {
            "id": "uid",
            "name": "name",
            "mail": "mail"
        },
        "oidc_login_default_group": "oidc",
        "oidc_login_use_external_storage": false,
        "oidc_login_scope": "openid profile email",
        "oidc_login_proxy_ldap": true,
        "oidc_login_disable_registration": true,
        "oidc_login_redir_fallback": true,
        "oidc_login_tls_verify": true,
        "oidc_create_groups": false,
        "oidc_login_webdav_enabled": false,
        "oidc_login_password_authentication": false,
        "oidc_login_public_key_caching_time": 86400,
        "oidc_login_min_time_between_jwks_requests": 10,
        "oidc_login_well_known_caching_time": 86400,
        "log_type": "file"
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - circles: 24.0.0
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_ldap: 1.14.1
  - viewer: 1.8.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - dashboard: 7.2.0
  - encryption
  - firstrunwizard: 2.11.0
  - recommendations: 1.1.0
  - serverinfo: 1.12.0
  - survey_client: 1.10.0
  - user_status: 1.2.0
  - weather_status: 1.2.0

Nextcloud Signing status

no login possible

Nextcloud Logs

{"reqId":"5mBKznRVGJEiAzoBKP9C","level":0,"time":"2022-08-06T21:41:06+02:00","remoteAddr":"194.24.158.177","user":"--","app":"no app in context","method":"POST","url":"/login/webauthn/start","message":"CSRF check failed","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"24.0.3.2","exception":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\CrossSiteRequestForgeryException","Message":"CSRF check failed","Code":412,"Trace":[{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Http/Dispatcher.php","line":125,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud.schuerz.at/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":215,"message":"CSRF check failed","exception":{},"CustomMessage":"CSRF check failed"}}
{"reqId":"0diRPpjFvU3oCvHlGaTa","level":0,"time":"2022-08-06T21:41:15+02:00","remoteAddr":"194.24.158.177","user":"--","app":"no app in context","method":"GET","url":"/apps/files/","message":"Current user is not logged in","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0","version":"24.0.3.2","exception":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php","line":97,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Http/Dispatcher.php","line":125,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud.schuerz.at/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud.schuerz.at/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud.schuerz.at/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php","Line":153,"message":"Current user is not logged in","exception":{},"CustomMessage":"Current user is not logged in"}}

Additional info

No OC found index.js:46:4 Proxying an event bus of version 2.1.1 with 1.3.0 index.es.js:2337:14 JQMIGRATE: Migrate is installed, version 3.4.0 jquery-migrate.min.js:2:698 jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:62:15 $ is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:62:15 Backbone is deprecated: please ship your own, this will be removed in Nextcloud 20 globals.js:62:15 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 globals.js:62:15 Proxying an event bus of version 2.1.1 with 1.3.0 index.es.js:2337:14 jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own. globals.js:62:15 jQuery is deprecated: The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.

xundeenergie avatar Aug 06 '22 19:08 xundeenergie

You can close the Bug... I'm very sorry... it was big PEBKAC...

I tried last week to use redis as session.save_handler for php in php.ini

It did not work, so i reset my settings... but not fully. I had set back to session.save_handler = files but did not set back session.save_path to the original file... fixed now this, and nextcloud is reachable via webclient again.

Im very sorry for my false bugreport...

xundeenergie avatar Aug 06 '22 22:08 xundeenergie

Closed as requested.

st3iny avatar Dec 05 '22 11:12 st3iny