-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Nextcloud 14.0.1.1 login is broken for passwords longer than 214 bytes #11438
Comments
GitMate.io thinks possibly related issues are #9204 (Nextcloud upgrade to version 13.0.1), #3119 (Default calendar not showing after Upgrade to Nextcloud 11.0.1), #8768 (oc_phonetrack_points crash Nextcloud after update), #10429 (All contacts disappears after 4.0.0 Beta 1 update), and #5092 (Calendar and contact synchronisation with Thunderbird broken after migration to Nextcloud 12.0.0). |
Same here :( Using nginx with MariaDB |
Ref #11227 (not exactly the same problem but looks like another issue with openssl configuration) |
log file:
|
almost。the same。problem |
Just had a look at the code where the error occurs and it seems that the PublicKeyToken implementation is brand new in version 14. So unfortunately no way to bisect. |
@bodograumann #11227 (check this thread for possible solutions) |
I checked there, but to no avail.
But then I found the following: it works if the password is short enough! Try this:
:Facepalm: Of course. The message string, i.e. the password, can not be longer than the key, which only has 2048 bits... |
As seen in issue nextcloud#11438, since version 14, logging in with long passwords is not possible anymore. This tests checks whether the issue has been fixed.
@bodograumann thanks for the tests in #11619 However, I do not expect to soon find the time to look into this. As for 214 characters (while I'm against upper limits in general) does seem like a very reasonable password length. Of course if somebody has a PR to fix this it is more than welcome. |
I also don’t see an easy way to fix this.
|
@bodograumann still thanks for looking into this. I'll try to get this into the docs so it is at least documented. |
It seems this also affects all my previously created app-passwords. E.g. with webdav:
Do I really have to regenerate and redistribute all of them? |
i have to use 13.0.6 again this folder add. more key files make it failed |
@bodograumann ah so before 14 a password change made all your tokens invalid. Now with 14 we try to migrate to the new keys. But this then of course fails for you :( So unfortunatly yes. I'm sorry for that. |
I had a similar error message as shown below. My password was only 200 characters but had, however, high ANSI characters in it. I performed a password reset via
|
@ozinfotech That is to be expected. I probably should have said bytes instead of characters ;-) The encryption algorithm ultimately acts on bytes |
At least you've got an idea of what's going on. Thanks for working on it.
I suspected as much, but didn't dig in to the code. I'm glad you had posted your solution as that was helpful for me to get back up and going. |
use openssl_pkey_export($res, $privateKey, NULL, $config) |
I just ran into this issue after updating from 13 to 14. I have per-user encryption enabled. Running
Edit: After resetting the password and logging in, I was able to change the private key password to match my login password: |
Can confirm: Still an issue in 17.0.3 Can this at least be fixed by limiting the input field for passwords and within the JS Check? Log entry is: Trigger: A user set the password to a 256 char string. |
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you! |
Had to update my server first before nextcloud. |
This morning I did an update of nextcloud with
php updater.phar --no-interaction
.Unfortunately since then nextcloud only returns an internal server error. The log says:
Server configuration
Operating system:
Ubuntu 16.04 LTS
Web server:
Apache 2.4.18
Database:
MariaDB
PHP version:
php-7.0.32-0ubuntu0.16.04.1
Nextcloud version: (see Nextcloud admin page)
14.0.1.1
List of activated apps:
App list
Enabled: - accessibility: 1.0.1 - activity: 2.7.0 - bookmarks: 0.13.0 - bruteforcesettings: 1.1.0 - calendar: 1.6.2 - cloud_federation_api: 0.0.1 - comments: 1.4.0 - contacts: 2.1.6 - dav: 1.6.0 - federatedfilesharing: 1.4.0 - federation: 1.4.0 - files: 1.9.0 - files_pdfviewer: 1.3.2 - files_sharing: 1.6.2 - files_texteditor: 2.6.0 - files_trashbin: 1.4.1 - files_versions: 1.7.1 - files_videoplayer: 1.3.0 - firstrunwizard: 2.3.0 - gallery: 18.1.0 - logreader: 2.0.0 - lookup_server_connector: 1.2.0 - mail: 0.10.0 - news: 13.0.1 - nextcloud_announcements: 1.3.0 - notifications: 2.2.1 - oauth2: 1.2.1 - password_policy: 1.4.0 - provisioning_api: 1.4.0 - serverinfo: 1.4.0 - sharebymail: 1.4.0 - support: 1.0.0 - survey_client: 1.2.0 - systemtags: 1.4.0 - theming: 1.5.0 - twofactor_backupcodes: 1.3.1 - updatenotification: 1.4.1 - workflowengine: 1.4.0 Disabled: - admin_audit - encryption - files_external - tasks - user_external - user_ldapNextcloud configuration:
Config report
{ "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "next.grmnn.de" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "14.0.1.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "maintenance": false, "theme": "", "loglevel": 0, "mysql.utf8mb4": true, "mail_smtpmode": "php", "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***" }, "apps": { "accessibility": { "enabled": "yes", "installed_version": "1.0.1", "types": "" }, "activity": { "enabled": "yes", "installed_version": "2.7.0", "types": "filesystem" }, "backgroundjob": { "lastjob": "255" }, "bookmarks": { "enabled": "yes", "installed_version": "0.13.0", "types": "" }, "bruteforcesettings": { "enabled": "yes", "installed_version": "1.1.0", "types": "" }, "calendar": { "enabled": "yes", "installed_version": "1.6.2", "types": "" }, "cloud_federation_api": { "enabled": "yes", "installed_version": "0.0.1", "types": "filesystem" }, "comments": { "enabled": "yes", "installed_version": "1.4.0", "types": "logging" }, "contacts": { "enabled": "yes", "installed_version": "2.1.6", "types": "" }, "core": { "backgroundjobs_mode": "cron", "installed.bundles": "[\"CoreBundle\"]", "installedat": "1494521336.5784", "lastcron": "1538148633", "lastupdateResult": "[]", "lastupdatedat": "1538115343", "moveavatarsdone": "yes", "oc.integritycheck.checker": "{\"news\":{\"FILE_MISSING\":{\"vendor\\\/ezyang\\\/htmlpurifier\\\/maintenance\\\/.htaccess\":{\"expected\":\"4d51270ac56b1600199cd52c4f0fc34171bb306db59761863c87978049b771a053ebb80c8dda03b4d98bf5e43361ec0e1e1d2ad4b01fc315fb809b40acd23843\",\"current\":\"\"}}}}", "previewsCleanedUp": "1", "public_files": "files_sharing\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "scss.variables": "84cfcb9d5861e1f5620e38d6f8245843", "updater.secret.created": "1521675954", "vendor": "nextcloud" }, "dav": { "buildCalendarSearchIndex": "yes", "enabled": "yes", "installed_version": "1.6.0", "types": "filesystem" }, "direct_menu": { "enabled": "no", "installed_version": "0.10.2", "types": "" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "federation": { "enabled": "yes", "installed_version": "1.4.0", "types": "authentication" }, "files": { "cronjob_scan_files": "500", "enabled": "yes", "installed_version": "1.9.0", "types": "filesystem" }, "files_pdfviewer": { "enabled": "yes", "installed_version": "1.3.2", "types": "" }, "files_sharing": { "enabled": "yes", "installed_version": "1.6.2", "types": "filesystem" }, "files_texteditor": { "enabled": "yes", "installed_version": "2.6.0", "types": "" }, "files_trashbin": { "enabled": "yes", "installed_version": "1.4.1", "types": "filesystem,dav" }, "files_versions": { "enabled": "yes", "installed_version": "1.7.1", "types": "filesystem,dav" }, "files_videoplayer": { "enabled": "yes", "installed_version": "1.3.0", "types": "" }, "firstrunwizard": { "enabled": "yes", "installed_version": "2.3.0", "types": "logging" }, "gallery": { "enabled": "yes", "installed_version": "18.1.0", "types": "" }, "logreader": { "enabled": "yes", "installed_version": "2.0.0", "levels": "11111", "ocsid": "170871", "types": "" }, "lookup_server_connector": { "enabled": "yes", "installed_version": "1.2.0", "types": "authentication" }, "mail": { "enabled": "yes", "installed_version": "0.10.0", "types": "" }, "news": { "enabled": "yes", "installed_version": "13.0.1", "types": "" }, "nextcloud_announcements": { "enabled": "yes", "installed_version": "1.3.0", "pub_date": "Sat, 10 Dec 2016 00:00:00 +0100", "types": "logging" }, "notifications": { "enabled": "yes", "installed_version": "2.2.1", "types": "logging" }, "oauth2": { "enabled": "yes", "installed_version": "1.2.1", "types": "authentication" }, "password_policy": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "1.4.0", "types": "prevent_group_restriction" }, "serverinfo": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "sharebymail": { "enabled": "yes", "installed_version": "1.4.0", "types": "filesystem" }, "support": { "enabled": "yes", "installed_version": "1.0.0", "types": "" }, "survey_client": { "enabled": "yes", "installed_version": "1.2.0", "types": "" }, "systemtags": { "enabled": "yes", "installed_version": "1.4.0", "types": "logging" }, "tasks": { "enabled": "no", "installed_version": "0.9.6", "ocsid": "164356", "types": "" }, "theming": { "enabled": "yes", "installed_version": "1.5.0", "types": "logging" }, "twofactor_backupcodes": { "enabled": "yes", "installed_version": "1.3.1", "types": "" }, "updatenotification": { "bookmarks": "0.12.2", "bruteforcesettings": "1.1.0", "calendar": "1.6.1", "contacts": "2.1.5", "core": "13.0.6.1", "enabled": "yes", "files_pdfviewer": "1.2.1", "installed_version": "1.4.1", "mail": "0.8.3", "news": "12.0.4", "notify_groups": "[\"admin\",\"maintenance\"]", "tasks": "0.9.7", "theming": "1.4.5", "types": "", "update_check_errors": "0" }, "workflowengine": { "enabled": "yes", "installed_version": "1.4.0", "types": "filesystem" } } }Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
The text was updated successfully, but these errors were encountered: