[public link] No error if password don't match password rules or allow edition without password set
Closed this issue · 2 comments
wargreen commented
Describe the bug
When try to enable the edition without password set, no error is shown but the parameter is not set
Setting a password that don't match the rules of the NC instance, NC return a 500 but no error is shown.
To Reproduce
Steps to reproduce the behavior:
- Share a collective by link
- Try to enable edition
- Try to set a password that don't match the rules
Expected behavior
A clear error explain what happen
Screenshots
Server details:
- Collectives app version: 2.12.0
- Nextcloud version: 28.0.6
- PHP Version: 8.2
- Database: Mariadb
Client details:
- OS: Debian
- Browser: Firefox
- Browser version: 126
- Device: desktop
Logs
Nextcloud log (data/nextcloud.log)
{"reqId":"NMhwB08TNOhvF4MpiSm0","level":3,"time":"2024-06-16T16:59:21+00:00","remoteAddr":"91.168.186.94","user":"wargreen","app":"collectives","method":"PUT","url":"/apps/collectives/_api/15/share/7RMqnNKNwzNfs9F","message":"Collectives App Error: Le mot de passe doit comporter au moins 10 caractères. Le mot de passe doit contenir au moins un chiffre.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"28.0.6.1","exception":{"Exception":"Exception","Message":"Le mot de passe doit comporter au moins 10 caractères. Le mot de passe doit contenir au moins un chiffre.","Code":0,"Trace":[{"file":"/srv/nextcloud/lib/private/Share20/Manager.php","line":1158,"function":"verifyPassword","class":"OC\\Share20\\Manager","type":"->"},{"file":"/srv/nextcloud/lib/private/Share20/Manager.php","line":1028,"function":"updateSharePasswordIfNeeded","class":"OC\\Share20\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/apps/collectives/lib/Service/CollectiveShareService.php","line":240,"function":"updateShare","class":"OC\\Share20\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/apps/collectives/lib/Controller/ShareController.php","line":103,"function":"updateShare","class":"OCA\\Collectives\\Service\\CollectiveShareService","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/apps/collectives/lib/Controller/ErrorHelper.php","line":23,"function":"OCA\\Collectives\\Controller\\{closure}","class":"OCA\\Collectives\\Controller\\ShareController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/apps/collectives/lib/Controller/ShareController.php","line":36,"function":"handleErrorResponse","class":"OCA\\Collectives\\Controller\\ShareController","type":"->"},{"file":"/srv/nextcloud/apps/collectives/lib/Controller/ShareController.php","line":96,"function":"prepareResponse","class":"OCA\\Collectives\\Controller\\ShareController","type":"->"},{"file":"/srv/nextcloud/apps/collectives/lib/Controller/ShareController.php","line":64,"function":"updatePageShare","class":"OCA\\Collectives\\Controller\\ShareController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"updateCollectiveShare","class":"OCA\\Collectives\\Controller\\ShareController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/srv/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/nextcloud/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/nextcloud/index.php","line":39,"function":"handleRequest","class":"OC","type":"::"}],"File":"/srv/nextcloud/lib/private/Share20/Manager.php","Line":201,"message":"Collectives App Error: Le mot de passe doit comporter au moins 10 caractères. Le mot de passe doit contenir au moins un chiffre.","exception":[],"CustomMessage":"Collectives App Error: Le mot de passe doit comporter au moins 10 caractères. Le mot de passe doit contenir au moins un chiffre."},"id":"666f1bf67fd59"}
Browser log
Failed to update share link
estux commented
Hello, this problem is already known and was reported here: #1269
In particular my comment #1269 (comment) and the dev reply are referring to this problem.