Skip to content
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]: Infinite recursion during creation of users #35056

Closed
6 of 9 tasks
christianlupus opened this issue Nov 9, 2022 · 3 comments · Fixed by nextcloud-libraries/nextcloud-vue#3478
Closed
6 of 9 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug

Comments

@christianlupus
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

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

Bug description

When going to the user backend under https://example.com/index.php/settings/users, adding users is not working without minor errors and significant delays. After clicking on add user in the modal dialog, the dialog does not immediately disappear.

The page gets unresponsive for some seconds. This triggered even the protection by my Firefox browser that told me that the site would delay execution and asked if I wanted to stop the execution of the page.

In the browser console, there is a message about a too-deep recursion:
grafik

Steps to reproduce

  1. Login to the web frontend as administrator
  2. Go to the users admin page
  3. Click on the add user button on the left to open the modal dialog
  4. Type in user details (user name, display name, mail) and hit the create user button below.
  5. Have a look at the browser console

Expected behavior

There is no error reported, the browser keeps responsive and the creation of the user takes <1 second.

Installation method

Community Docker image

Operating system

Other

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MariaDB

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

No response

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

{                                                       
    "system": {         
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [                               
            {                                           
                "path": "\/var\/www\/html\/apps", 
                "url": "\/apps",
                "writable": false
            },
            {                                            
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true                          
            }                                     
        ],                                        
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {            
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379  
        },                        
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [ 
            "cloud.tsc-vfl.de"  
        ],                       
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",                                                                                            
        "version": "25.0.1.1",                         
        "overwrite.cli.url": "https:\/\/cloud.tsc-vfl.de",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",       
        "dbport": "",          
        "dbtableprefix": "oc_",                          
        "mysql.utf8mb4": true,                                                                                        
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,      
        "app_install_overwrite": [
            "twofactor_admin",
            "files_texteditor"
        ],
        "maintenance": false,        
        "mail_smtpmode": "smtp",                        
        "mail_smtpsecure": "tls",                   
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***", 
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",                         
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,          
        "default_phone_region": "DE",
        "skeletondirectory": "",                         
        "templatedirectory": "",                                                                                      
        "theme": ""                                    
    }                                                     
}

List of activated Apps

Enabled:              
  - activity: 2.17.0
  - appointments: 1.14.0
  - bruteforcesettings: 2.5.0
  - calendar: 4.1.0   
  - checksum: 1.1.5
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0             
  - contacts: 5.0.1       
  - contactsinteraction: 1.6.0             
  - dav: 1.24.0          
  - external: 5.0.0          
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1           
  - files_downloadactivity: 1.15.0
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_texteditor: 2.14.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - forms: 3.0.1 
  - groupfolders: 13.0.0
  - groupquota: 0.1.9     
  - integration_google: 1.0.8   
  - logreader: 2.10.0                     
  - lookup_server_connector: 1.13.0
  - mail: 2.1.0          
  - metadata: 0.17.0     
  - nextcloud_announcements: 1.14.0
  - notes: 4.6.0          
  - notifications: 2.13.1               
  - oauth2: 1.13.0     
  - password_policy: 1.15.0
  - polls: 4.0.0 
  - privacy: 1.9.0  
  - provisioning_api: 1.15.0
  - quota_warning: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.3
  - richdocuments: 7.0.1
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0                                                                                               
  - sociallogin: 5.0.5
  - spreed: 15.0.1  
  - support: 1.8.0      
  - survey_client: 1.13.0    
  - systemtags: 1.15.0
  - tasks: 0.14.5  
  - text: 3.6.0    
  - theming: 2.0.1             
  - twofactor_backupcodes: 1.14.0
  - twofactor_email: 2.7.1
  - twofactor_nextcloud_notification: 3.5.0
  - twofactor_totp: 7.0.0
  - twofactor_webauthn: 1.0.0
  - updatenotification: 1.15.0  
  - user_status: 1.5.0
  - user_usage_report: 1.9.0
  - viewer: 1.9.0                 
  - workflowengine: 2.7.0 
Disabled:                 
  - admin_audit            
  - apporder: 0.15.0     
  - collectives: 2.0.0      
  - dashboard: 7.4.0      
  - deck: 1.8.1           
  - drawio: 1.0.3
  - encryption          
  - files_antivirus: 3.3.1
  - files_fulltextsearch: 24.0.1
  - files_fulltextsearch_tesseract: 24.0.0
  - files_linkeditor: 1.1.12       
  - files_markdown: 2.3.6
  - files_mindmap: 0.0.26
  - firstrunwizard: 2.13.0         
  - fulltextsearch: 24.0.0
  - fulltextsearch_elasticsearch: 24.0.1
  - impersonate: 1.11.0
  - oidc_login: 2.3.3      
  - photos: 1.6.0
  - suspicious_login
  - transfer: 0.6.0         
  - twofactor_u2f        
  - user_ldap             
  - weather_status: 1.4.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"7HiDkWh55ImmhUuVDhGb","level":2,"time":"2022-11-09T15:50:18+00:00","remoteAddr":"79.202.125.244","user":"klaus.richter","app":"no app in context","method":"GET","url":"/index.php/core/preview?fileId=100767&x=250&y=250","message":"Host 192.168.0.249 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.35","version":"25.0.1.1","data":[]}
{"reqId":"IjhKA5KL5n71wffpEPuX","level":2,"time":"2022-11-09T15:50:18+00:00","remoteAddr":"79.202.125.244","user":"klaus.richter","app":"no app in context","method":"GET","url":"/index.php/core/preview?fileId=100716&x=250&y=250","message":"Host 192.168.0.249 was not connected to because it violates local access rules","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.35","version":"25.0.1.1","data":[]}
{"reqId":"PdC9xBIZedGjY1fkbm6F","level":3,"time":"2022-11-09T15:50:51+00:00","remoteAddr":"79.202.125.244","user":"--","app":"core","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"Tried to log in klaus.richter but could not verify token","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Edg/107.0.1418.35","version":"25.0.1.1","data":{"app":"core"}}
{"reqId":"a7oaI3imbg7lxUy1gZ7h","level":2,"time":"2022-11-09T15:58:55+00:00","remoteAddr":"93.221.94.102","user":"christianwolf","app":"ocs_api","method":"POST","url":"/ocs/v2.php/cloud/users","message":"Failed addUser attempt with hint exception.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0","version":"25.0.1.1","exception":{"Exception":"OC\\HintException","Message":"Password needs to contain at least one numeric character. Password needs to contain at least one lower and one upper case character.","Code":0,"Trace":[{"file":"/srv/data/tsc-cloud/cloud/apps/password_policy/lib/Listener/ValidatePasswordPolicyEventListener.php","line":46,"function":"validate","class":"OCA\\Password_Policy\\PasswordValidator","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/EventDispatcher/ServiceEventListener.php","line":87,"function":"handle","class":"OCA\\Password_Policy\\Listener\\ValidatePasswordPolicyEventListener","type":"->","args":[{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"}]},{"file":"/srv/data/tsc-cloud/cloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->","args":[{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"},"OCP\\Security\\Events\\ValidatePasswordPolicyEvent",{"__class__":"Symfony\\Component\\EventDispatcher\\EventDispatcher"}]},{"file":"/srv/data/tsc-cloud/cloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[[{"__class__":"Closure"}],"OCP\\Security\\Events\\ValidatePasswordPolicyEvent",{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"}]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/EventDispatcher/EventDispatcher.php","line":88,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"},"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/EventDispatcher/EventDispatcher.php","line":100,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":["OCP\\Security\\Events\\ValidatePasswordPolicyEvent",{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"}]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/User/Database.php","line":123,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->","args":[{"__class__":"OCP\\Security\\Events\\ValidatePasswordPolicyEvent"}]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/User/Manager.php","line":469,"function":"createUser","class":"OC\\User\\Database","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/User/Manager.php","line":413,"function":"createUserFromBackend","class":"OC\\User\\Manager","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***",{"__class__":"OC\\User\\Database"}]},{"file":"/srv/data/tsc-cloud/cloud/apps/provisioning_api/lib/Controller/UsersController.php","line":420,"function":"createUser","class":"OC\\User\\Manager","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"addUser","class":"OCA\\Provisioning_API\\Controller\\UsersController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"addUser"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Provisioning_API\\Controller\\UsersController"},"addUser"]},{"file":"/srv/data/tsc-cloud/cloud/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Provisioning_API\\Controller\\UsersController","addUser",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["ocs.provisioning_api.Users.addUser"]]},{"file":"/srv/data/tsc-cloud/cloud/ocs/v1.php","line":63,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/cloud/users"]},{"file":"/srv/data/tsc-cloud/cloud/ocs/v2.php","line":23,"args":["/srv/data/tsc-cloud/cloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/data/tsc-cloud/cloud/apps/password_policy/lib/PasswordValidator.php","Line":87,"Hint":"Das Passwort muss mindestens eine Zahl beinhalten.  Das Passwort muss mindestens einen Klein- und einen Gro\u00dfbuchstaben beinhalten. ","message":"Failed addUser attempt with hint exception.","exception":{},"CustomMessage":"Failed addUser attempt with hint exception."}}

Additional info

I am using the official docker image on top of Archlinux.

I do not know if the problem was introduced after the last minor release or the major release. I initially installed NC24 from scratch and there it worked. After the update to NC 25.0.0 (?) I did not try to add a user.

The nextcloud logs are truncated. The problem seems related with the frontend only. The error was due to my trying a too short password. The problem appeared after that request. thus, I truncated.

@christianlupus christianlupus added bug 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Nov 9, 2022
@SystemKeeper
Copy link
Contributor

Probably this one?! nextcloud-libraries/nextcloud-vue#3386

@christianlupus
Copy link
Contributor Author

Yeah, that could be true. Is there a way to verify this? At least it sounds similar to my problem.

@PVince81
Copy link
Member

some modals are delayed because of the focus trap issue, it happens also for the dialog for setting a user's status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants