nextcloud / password_policy

:lock: Let the admin define certain rules for passwords, e.g. a minimum length
GNU Affero General Public License v3.0
35 stars 19 forks source link

Error generating password from password_policy #458

Open ottoking8912 opened 1 year ago

ottoking8912 commented 1 year ago

Password policy 1.15

Steps to reproduce

  1. Check that Password policy app is active (in my chase v1.15)
  2. Create a new share
  3. error popup: "Error generating password from password_policy

Expected behaviour

Tell us what should happen Share with password will be created

Actual behaviour

Share with password gets created and the share is working fine but the error msg is confusing and irritating for the user causing unnecessary troubles across the company.

Server configuration

Operating system: RHEL 9.1

Web server: Apache 2.4.53

Database: MariaDB 10.5.16

PHP version: 8.0.20

Nextcloud version: (see Nextcloud admin page) 25.0.5

Where did you install Nextcloud from: From the official website

List of activated apps: Enabled:

{ "system": { "default_language": "de", "default_locale": "de_DE", "force_locale": "de_DE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_proxies": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "ncmig.ages.at" ], "datadirectory": "REMOVED SENSITIVE VALUE", "skeletondirectory": "\/home\/nextcloud_skeleton", "dbtype": "mysql", "version": "25.0.5.1", "overwrite.cli.url": "https:\/\/ncmig.ages.at", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "", "mysql.utf8mb4": true, "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true, "instanceid": "REMOVED SENSITIVE VALUE", "memcache.local": "\OC\Memcache\APCu", "proxy": "serverproxy.ages.at:3128", "log_rotate_size": 0, "log_query": false, "logtimezone": "Europe\/Berlin", "mail_domain": "REMOVED SENSITIVE VALUE", "mail_from_address": "REMOVED SENSITIVE VALUE", "mail_smtpmode": "smtp", "mail_smtphost": "REMOVED SENSITIVE VALUE", "mail_smtpport": 25, "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\User_LDAP\LDAPProviderFactory", "maintenance": false, "default_phone_region": "AT", "theme": "", "loglevel": 0, "updater.release.channel": "stable", "twofactor_enforced": "true", "twofactor_enforced_groups": [ "extern" ], "twofactor_enforced_excluded_groups": [], "app_install_overwrite": [ "external", "registration" ] }, "apps": { "activity": { "enabled": "yes", "installed_version": "2.17.0", "notify_email_calendar": "0", "notify_email_calendar_event": "0", "notify_email_calendar_todo": "0", "notify_email_comments": "0", "notify_email_favorite": "0", "notify_email_file_changed": "0", "notify_email_file_created": "0", "notify_email_file_deleted": "0", "notify_email_file_restored": "0", "notify_email_public_links": "0", "notify_email_remote_share": "0", "notify_email_shared": "0", "notify_email_systemtags": "0", "notify_setting_batchtime": "0", "notify_setting_self": "1", "notify_setting_selfemail": "0", "notify_stream_calendar": "1", "notify_stream_calendar_event": "1", "notify_stream_calendar_todo": "1", "notify_stream_comments": "1", "notify_stream_favorite": "1", "notify_stream_file_changed": "1", "notify_stream_file_created": "1", "notify_stream_file_deleted": "1", "notify_stream_file_favorite": "0", "notify_stream_file_restored": "1", "notify_stream_public_links": "1", "notify_stream_remote_share": "1", "notify_stream_shared": "1", "notify_stream_systemtags": "1", "types": "filesystem" }, "backgroundjob": { "lastjob": "430975" }, "circles": { "enabled": "yes", "installed_version": "25.0.0", "loopback_tmp_scheme": "https", "maintenance_run": "0", "maintenance_update": "{\"maximum\":4,\"5\":1681527621,\"4\":1681783237,\"3\":1681821003,\"2\":1681823702,\"1\":1681823702}", "migration_22": "1", "migration_22_1": "1", "migration_run": "0", "types": "filesystem,dav" }, "cloud_federation_api": { "enabled": "yes", "installed_version": "1.8.0", "types": "filesystem" }, "comments": { "enabled": "yes", "installed_version": "1.15.0", "types": "logging" }, "contactsinteraction": { "enabled": "yes", "installed_version": "1.6.0", "types": "dav" }, "core": { "backgroundjobs_mode": "cron", "enterpriseLogoChecked": "yes", "installedat": "1543569323.6686", "lastcron": "1681823703", "lastupdateResult": "[]", "lastupdatedat": "1681822972", "moveavatarsdone": "yes", "newUser.sendEmail": "yes", "oc.integritycheck.checker": "[]", "previewsCleanedUp": "1", "public_files": "files_sharing\/public.php", "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", "scss.variables": "f4e4d40164a97ce3f88e675898e9bfbe", "shareapi_default_expire_date": "yes", "shareapi_default_internal_expire_date": "no", "shareapi_default_remote_expire_date": "no", "shareapi_enforce_expire_date": "no", "shareapi_enforce_links_password": "yes", "shareapi_expire_after_n_days": "90", "shareapi_only_share_with_group_members": "no", "theming.variables": "e33753607a5bbde70f4842e91b6bb8cd", "updater.secret.created": "1673328768", "vendor": "nextcloud" }, "dashboard": { "enabled": "no", "installed_version": "7.0.0", "types": "" }, "dav": { "buildCalendarReminderIndex": "yes", "buildCalendarSearchIndex": "yes", "chunks_migrated": "1", "enabled": "yes", "generateBirthdayCalendar": "no", "installed_version": "1.24.0", "regeneratedBirthdayCalendarsForYearFix": "yes", "types": "filesystem" }, "external": { "enabled": "no", "installed_version": "3.3.1", "types": "" }, "federatedfilesharing": { "enabled": "yes", "installed_version": "1.15.0", "types": "" }, "federation": { "enabled": "yes", "installed_version": "1.15.0", "types": "authentication" }, "files": { "cronjob_scan_files": "500", "default_quota": "500 MB", "enabled": "yes", "installed_version": "1.20.1", "types": "filesystem" }, "files_external": { "enabled": "yes", "installed_version": "1.17.0", "types": "filesystem" }, "files_pdfviewer": { "enabled": "no", "installed_version": "2.0.1", "types": "" }, "files_rightclick": { "enabled": "yes", "installed_version": "1.4.0", "types": "" }, "files_sharing": { "enabled": "yes", "incoming_server2server_group_share_enabled": "no", "installed_version": "1.17.0", "lookupServerEnabled": "no", "lookupServerUploadEnabled": "no", "outgoing_server2server_group_share_enabled": "no", "types": "filesystem" }, "files_texteditor": { "enabled": "no", "installed_version": "2.8.0", "types": "" }, "files_trashbin": { "enabled": "yes", "installed_version": "1.15.0", "types": "filesystem,dav" }, "files_versions": { "enabled": "yes", "installed_version": "1.18.0", "types": "filesystem,dav" }, "firstrunwizard": { "enabled": "yes", "installed_version": "2.14.0", "types": "logging" }, "gallery": { "enabled": "no", "installed_version": "18.4.0", "types": "" }, "logreader": { "enabled": "yes", "installed_version": "2.10.0", "levels": "11111", "live": "1", "relativedates": "1", "types": "" }, "lookup_server_connector": { "enabled": "yes", "installed_version": "1.13.0", "types": "authentication" }, "nextcloud_announcements": { "enabled": "yes", "installed_version": "1.14.0", "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200", "types": "logging" }, "notifications": { "enabled": "yes", "installed_version": "2.13.1", "types": "logging" }, "oauth2": { "enabled": "yes", "installed_version": "1.13.0", "types": "authentication" }, "password_policy": { "enabled": "yes", "enforceHaveIBeenPwned": "1", "enforceNonCommonPassword": "1", "enforceNumericCharacters": "0", "enforceSpecialCharacters": "0", "enforceUpperLowerCase": "0", "historySize": "0", "installed_version": "1.15.0", "maximumLoginAttempts": "0", "minLength": "8", "types": "authentication" }, "photos": { "enabled": "yes", "installed_version": "2.0.1", "types": "dav,authentication" }, "privacy": { "enabled": "yes", "installed_version": "1.9.0", "types": "" }, "provisioning_api": { "enabled": "yes", "installed_version": "1.15.0", "types": "prevent_group_restriction" }, "recommendations": { "enabled": "no", "installed_version": "0.6.0", "types": "" }, "registration": { "admin_approval_required": "yes", "enabled": "no", "installed_version": "0.4.7", "registered_user_group": "extern", "types": "" }, "related_resources": { "enabled": "yes", "installed_version": "1.0.4", "types": "" }, "serverinfo": { "cached_count_filecache": "210874", "cached_count_storages": "958", "enabled": "yes", "installed_version": "1.15.0", "types": "" }, "settings": { "enabled": "yes", "installed_version": "1.7.0", "types": "" }, "sharebymail": { "enabled": "yes", "enforcePasswordProtection": "yes", "installed_version": "1.15.0", "types": "filesystem" }, "support": { "SwitchUpdaterServerHasRun": "yes", "enabled": "yes", "installed_version": "1.8.0", "last_notification": "1660394701", "types": "session" }, "survey_client": { "enabled": "no", "installed_version": "1.7.0", "types": "" }, "systemtags": { "enabled": "yes", "installed_version": "1.15.0", "types": "logging" }, "text": { "enabled": "yes", "installed_version": "3.6.0", "types": "dav", "workspace_available": "0" }, "theming": { "backgroundMime": "backgroundColor", "cachebuster": "25", "color": "#E1C200", "disable-user-theming": "yes", "enabled": "yes", "imprintUrl": "REMOVED SENSITIVE VALUE", "installed_version": "2.0.1", "logoMime": "image\/png", "name": "REMOVED SENSITIVE VALUE", "privacyUrl": "REMOVED SENSITIVE VALUE", "slogan": "REMOVED SENSITIVE VALUE", "types": "logging", "url": "REMOVED SENSITIVE VALUE" }, "twofactor_admin": { "enabled": "yes", "installed_version": "4.1.9", "types": "" }, "twofactor_backupcodes": { "enabled": "yes", "installed_version": "1.14.0", "types": "" }, "twofactor_totp": { "enabled": "yes", "installed_version": "7.0.0", "types": "" }, "updatenotification": { "core": "23.0.12.2", "enabled": "yes", "files_rightclick": "0.15.1", "installed_version": "1.15.0", "notify_groups": "[\"REMOVED SENSITIVE VALUE\"]", "registration": "0.4.6", "twofactor_admin": "3.2.0", "twofactor_totp": "6.3.0", "types": "", "update_check_errors": "0", "user_usage_report": "1.1.4" }, "user_ldap": { "background_sync_interval": "1800", "background_sync_offset": "0", "background_sync_prefix": "s01", "cleanUpJobOffset": "100", "enabled": "yes", "installed_version": "1.15.0", "s01_lastChange": "1680532069", "s01has_memberof_filter_support": "1", "s01home_folder_naming_rule": "attr:sAMAccountName", "s01ldap_agent_password": "REMOVED SENSITIVE VALUE", "s01ldap_attributes_for_user_search": "sAMAccountName\nsn\nmail", "s01ldap_base": "REMOVED SENSITIVE VALUE", "s01ldap_base_groups": "REMOVED SENSITIVE VALUE", "s01ldap_base_users": "REMOVED SENSITIVE VALUE", "s01ldap_configuration_active": "1", "s01ldap_display_name": "displayname", "s01ldap_dn": "REMOVED SENSITIVE VALUE", "s01ldap_email_attr": "mail", "s01ldap_group_filter": "", "s01ldap_group_member_assoc_attribute": "member", "s01ldap_host": "REMOVED SENSITIVE VALUE", "s01ldap_login_filter": "(&(&(|(objectclass=person))(|(|(memberof=CN=REMOVED SENSITIVE VALUE)(primaryGroupID=32202))))(|(sAMAccountName=%uid)))", "s01ldap_loginfilter_attributes": "sAMAccountName", "s01ldap_loginfilter_username": "0", "s01ldap_nested_groups": "1", "s01ldap_port": "389", "s01ldap_user_display_name_2": "", "s01ldap_userfilter_groups": "REMOVED SENSITIVE VALUE", "s01ldap_userfilter_objectclass": "person", "s01ldap_userlist_filter": "(&(|(objectclass=person))(|(|(memberof=CN=REMOVED SENSITIVE VALUE)(primaryGroupID=32202))))", "types": "authentication" }, "user_status": { "enabled": "no", "installed_version": "1.0.1", "types": "" }, "user_usage_report": { "enabled": "yes", "installed_version": "1.10.0", "types": "filesystem" }, "viewer": { "enabled": "yes", "installed_version": "1.9.0", "types": "" }, "weather_status": { "enabled": "no", "installed_version": "1.0.0", "types": "" }, "workflowengine": { "enabled": "yes", "installed_version": "2.7.0", "types": "filesystem" } } }

Client configuration

Browser: Firefox 112 & 102.5.0 esr Chrome 112.0.5615.121

Operating system: Windows 10

Logs

Nextcloud log (data/owncloud.log)

Insert your Nextcloud log here
the log file consits of 41k lines if necessary I will provide is separately

#### Browser log

Insert your browser log here, this could for example include:

Will provide when necessary

mkofahl commented 1 year ago

Same with NextCloud 25.0.6 and

mayonezo commented 1 year ago

It would be awesome, if auto-generated passwords would automatically meet password policy criteria.

Another issue that I have with this is, that the dialogue automatically closes, when I directly enter an E-Mail address in the Sharing dialogue. My workaround is, that I click the + next to "Share Link". Then the error pops up again, put the dialogue does not auto-close.

joshtrichards commented 5 months ago

@ottoking8912 I can't reproduce this behavior. Your reproductions steps were a bit vague, but I assume you're creating a sharing with a password when this error pops up? Also what is your password policy?

joshtrichards commented 5 months ago

@mkofahl Are you still able to reproduce this behavior?

ottoking8912 commented 5 months ago

Sorry but this issue is almost 1 year old, can't remember what I did there to finally solve it (and forgot to update here) . This might have been already fixed with a newer version of nextcloud.

mayonezo commented 5 months ago

When I enter an E-Mail address to share a file, I get a dialog that says "password created", but the password field stays empty. Then, when I then try to confirm the share, I get the message "Fehler beim Erstellen der Freigabe: Passwords are enforced for link and mail shares". So I guess auto-creating passwords is broken altogether for me.