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]: UserRateThrottle to stringent for profile updates #39733

Closed
5 of 8 tasks
TriggerHorizon opened this issue Aug 6, 2023 · 4 comments · Fixed by #39825
Closed
5 of 8 tasks

[Bug]: UserRateThrottle to stringent for profile updates #39733

TriggerHorizon opened this issue Aug 6, 2023 · 4 comments · Fixed by #39825
Assignees
Labels
3. to review Waiting for reviews 27-feedback bug feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) security

Comments

@TriggerHorizon
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

Our users are actively creating and updating their profiles. The @UserRateThrottle(limit=50, period=600) in
apps/provisioning_api/lib/Controller/UsersController.php for function editUser appears to be to stringent while editing "about".

The about field is saved "continously" as you are creating the content and if creating a new profile you can quite easily surpass 50 calls in 10 minutes. This lead to our users receiving error message "Unable to update about. There were too many requests from your network ..." and then they can no longer work on their profile until the period has expired.

Would suggest increasing the default limit or making this a configurable parameter.

Steps to reproduce

  1. Create new user
  2. Update profile including the about ... enter information slowly in the about field such that data is stored "continuosly"
  3. Get locked out of updating profile after 50 api calls until period has expired.

Expected behavior

Would expect that you could fully create your profile including the about section, which you might spend some time on, without receiving error messages and getting throttled.

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

None

PHP engine version

None

Web server

None

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 22 to 23)

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": {
        "htaccess.RewriteBase": "\/",
        "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
            }
        ],
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "27.0.1.2",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***",
        "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***",
        "skeletondirectory": "",
        "default_phone_region": "NO",
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "debug": false
    }
}

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@TriggerHorizon TriggerHorizon added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Aug 6, 2023
@kesselb
Copy link
Contributor

kesselb commented Aug 6, 2023

cc @Pytal @nickvergessen

@kesselb
Copy link
Contributor

kesselb commented Aug 6, 2023

Indeed, the user rate limit but also the debounce timeout for the profile fields is very low.

@kesselb kesselb added 1. to develop Accepted and waiting to be taken care of 27-feedback and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 6, 2023
@nickvergessen
Copy link
Member

Then I'd suggest to start with increasing the debounce. The endpoint is used for lot of other details as well and increasing the rate limit is not really planned.

@Pytal Pytal self-assigned this Aug 11, 2023
@Pytal Pytal added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Aug 11, 2023
@Pytal
Copy link
Member

Pytal commented Aug 11, 2023

Increased in #39825

500ms seems pretty standard but increasing to 1s here seems fine

@joshtrichards joshtrichards added security feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews 27-feedback bug feature: profile PRs or issues related to the Profile feature (e.g. Profile page, API, etc.) security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants