nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.36k stars 4.06k forks source link

Takes long time for password change through API #27059

Closed krakazyabra closed 3 years ago

krakazyabra commented 3 years ago

Steps to reproduce

  1. curl -X PUT https://admin:pass@nc.domain.com/ocs/v1.php/cloud/users/UserName -H "OCS-APIRequest: true" -d key="password" -d value="NewPassword"

Expected behaviour

Password is changing fast

Actual behaviour

It takes ~1 minute to complete the request. But network is fine, because if I use weak password, API answers in a second:

curl -X PUT https://admin:pass@nc.domain.com/ocs/v1.php/cloud/users/UserName -H "OCS-APIRequest: true" -d key="password" -d value="123456789"
<?xml version="1.0"?>
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>103</statuscode>
  <message>Password is among the 1,000,000 most common ones. Please make it unique.</message>
  <totalitems></totalitems>
  <itemsperpage></itemsperpage>
 </meta>
 <data/>
</ocs>

So, I can exclude network. Command and response above shows, that API endpoint works.

Server configuration detail

Operating system: Linux 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64

Webserver: nginx/1.19.10 (fpm-fcgi)

Database: pgsql PostgreSQL 10.12 (Debian 10.12-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit

PHP version:

7.4.16 Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, session, posix, readline, Reflection, standard, SimpleXML, pdo_sqlite, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, cgi-fcgi, apcu, bcmath, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache

Nextcloud version: 19.0.10 - 19.0.10.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from:

Signing status
List of activated apps ``` Enabled: - accessibility: 1.5.0 - activity: 2.12.1 - admin_audit: 1.9.0 - analytics: 2.6.0 - appointments: 1.8.10 - apporder: 0.12.0 - bookmarks: 3.4.9 - calendar: 2.0.5 - camerarawpreviews: 0.7.11 - checksum: 0.4.5 - cloud_federation_api: 1.2.0 - comments: 1.9.0 - contacts: 3.5.1 - contactsinteraction: 1.0.0 - cookbook: 0.8.4 - dav: 1.15.0 - deck: 1.2.7 - drawio: 1.0.0 - external: 3.6.0 - extract: 1.3.1 - federatedfilesharing: 1.9.0 - federation: 1.9.0 - files: 1.14.0 - files_automatedtagging: 1.9.1 - files_downloadactivity: 1.8.0 - files_external: 1.10.0 - files_markdown: 2.3.2 - files_mindmap: 0.0.24 - files_pdfviewer: 1.8.0 - files_rightclick: 0.16.0 - files_sharing: 1.11.0 - files_texteditor: 2.14.0 - files_trashbin: 1.9.0 - files_versions: 1.12.0 - files_videoplayer: 1.8.0 - firstrunwizard: 2.8.0 - forms: 2.2.4 - groupfolders: 7.1.2 - groupquota: 0.1.5 - issuetemplate: 0.7.0 - keeweb: 0.6.5 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - mail: 1.4.3 - maps: 0.1.6 - music: 1.2.0 - news: 14.2.2 - notes: 3.6.4 - oauth2: 1.7.0 - onlyoffice: 6.4.2 - password_policy: 1.9.1 - photos: 1.1.0 - piwik: 0.8.0 - privacy: 1.3.0 - provisioning_api: 1.9.0 - quicknotes: 0.6.7 - quota_warning: 1.8.0 - recommendations: 0.7.0 - serverinfo: 1.9.0 - settings: 1.1.0 - sharebymail: 1.9.0 - sociallogin: 3.6.0 - socialsharing_email: 2.2.0 - spreed: 9.0.9 - support: 1.2.1 - survey_client: 1.7.0 - systemtags: 1.9.0 - tasks: 0.13.6 - text: 3.0.1 - twofactor_backupcodes: 1.8.0 - updatenotification: 1.9.0 - viewer: 1.3.0 - workflowengine: 2.1.0 Disabled: - dashboardcharts - dicomviewer - encryption - files_accesscontrol - gpxedit - gpxmotion - gpxpod - nextcloud_announcements - notifications - ocr - phonetrack - rainloop - theming - theming_customcss - user_ldap ```
Configuration (config/config.php) ``` { "theme": "mytheme", "forcessl": true, "blacklisted_files": [], "mail_smtpmode": "sendmail", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": 25, "mail_smtptimeout": 10, "mail_smtpsecure": "", "mail_smtpauth": false, "mail_smtpauthtype": "LOGIN", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "logfile": "\/dev\/stdout", "enable_previews": true, "preview_max_filesize_image": 4096, "preview_max_y": 4096, "preview_max_x": 4096, "enabledPreviewProviders": [ "OC\\Preview\\PNG", "OC\\Preview\\JPEG", "OC\\Preview\\GIF", "OC\\Preview\\HEIC", "OC\\Preview\\BMP", "OC\\Preview\\XBitmap", "OC\\Preview\\MP3", "OC\\Preview\\TXT", "OC\\Preview\\MarkDown", "OC\\Preview\\Illustrator", "OC\\Preview\\Photoshop" ], "logtimezone": "Europe\/Prague", "social_login_auto_redirect": true, "updatechecker": false, "has_internet_connection": true, "objectstore_multibucket": { "class": "\\OC\\Files\\ObjectStore\\S3", "arguments": { "num_buckets": 150000, "bucket": "nextcloud-", "autocreate": true, "key": "key", "secret": "secret", "use_ssl": true, "hostname": "s3.domain.org", "port": 443, "use_path_style": true } }, "onlyoffice": { "jwt_header": "Authorization", "verify_peer_off": true }, "loglevel": 3, "trusted_domains": [ "nc.domain.org", "localhost", "10.*.*.*", "onlyoffice.domain.org", "*cluster.local" ], "memcache.local": "\\OC\\Memcache\\Redis", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "filelocking.enabled": false, "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": "6379", "timeout": 0 }, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "pgsql", "version": "19.0.10.1", "overwrite.cli.url": "https:\/\/nc.domain.com", "overwriteprotocol": "https", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "updater.release.channel": "stable", "maintenance": false } ```

Are you using external storage, if yes which one: S3 as default storage

Are you using encryption:

Are you using an external user-backend, if yes which one: Keycloak through SocialLogin

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

Operating system: 5.11.13-arch1-1

Logs

Web server error log ``` Nothing unusual ```
Nextcloud log ``` Nothing unusual ```
Browser log
szaimen commented 3 years ago

Is this Issue still valid in NC21.0.3? If not, please close this issue. Thanks! :)

krakazyabra commented 3 years ago

@szaimen please, stop ask for closing issues instead of solving them! The issue is here more than 3 month without any movement and now you're asking to close it. And the same with another issues, more of them are older than half a year and still are not solved.

szaimen commented 3 years ago

So is this still happening on NC21.0.3?

krakazyabra commented 3 years ago

I know nothing about 21.0.3 this is actual for 19.0.13 and 20.0.11 I don't have plan to upgrade on latest version. Until there is support for 20.0.11 I'll use it.

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

krakazyabra commented 3 years ago

Open issue back, please. This problem still actual for 20.0.11

And please, stop closing unsolved issues.

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

krakazyabra commented 3 years ago

Unstale

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.