Attachment and sharing error
Steps to reproduce
- Create new secret and add an attachment - Save
- Sharing - Select user + add - Full access - Share
- Received a message in a bubble: “An error occurred during decryption”
- Received the error message when clicking on the vault: “Are you sure you want to leave? This will corrupt this credential”
Expected behaviour
The secret is shared with the provided permissions to the selected user.
Actual behaviour
The secret becomes corrupt when clicking on “Ok”.
Configuration
Operating system: Ubuntu Linux 20.04 (snap install, but tried in docker also)
Browser: Google Chrome, Firefox, Edge
Extensions that might cause interference: N/A
Passman version: 2.4.3
Operating system: Linux
Web server: : Apache
Database:: MySQL
PHP version:: 7.4
cloud server: Nextcloud
cloud version: 25.0.3
Nextcloud log
{"reqId":"s5obrXWQ388I4936PV46","level":3,"time":"2023-02-04T18:31:28+00:00","remoteAddr":"10.6.4.1","user":"1F87059B-7873-4CF6-B78C-4F440C994408","app":"index","method":"GET","url":"/index.phpman/api/v2/sharing/credential/24A8B12F-4020-4AB7-A56D-24A0C9F1FC08/acl","message":"An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36","version":"25.0.3.2","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^","Code":7,"Trace":[{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":296,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Exception\\DriverException"}]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":336,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/custom_apps/passman/lib/Db/ShareRequestMapper.php","line":87,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/passman/lib/Service/ShareService.php","line":282,"function":"getRequestsByItemGuidGroupedByUser","class":"OCA\\Passman\\Db\\ShareRequestMapper","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/custom_apps/passman/controller/sharecontroller.php","line":447,"function":"getCredentialPendingAclList","class":"OCA\\Passman\\Service\\ShareService","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getItemAcl","class":"OCA\\Passman\\Controller\\ShareController","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ShareController","getItemAcl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08","passman.share.getItemAcl"]]},{"file":"/var/www/html/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/passman/api/v2/sharing/credential/24A8B12F-4020-4AB7-A56D-24A0C9F1FC08/acl"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[42803]: Grouping error: 7 ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1780,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\PostgreSQL\\ExceptionConverter","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},{"__class__":"Doctrine\\DBAL\\Query"}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1719,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},{"__class__":"Doctrine\\DBAL\\Query"}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1067,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDO\\Exception"},"SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = ? GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2]]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = ? GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = :dcValue1 GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":294,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":336,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/custom_apps/passman/lib/Db/ShareRequestMapper.php","line":87,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/passman/lib/Service/ShareService.php","line":282,"function":"getRequestsByItemGuidGroupedByUser","class":"OCA\\Passman\\Db\\ShareRequestMapper","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/custom_apps/passman/controller/sharecontroller.php","line":447,"function":"getCredentialPendingAclList","class":"OCA\\Passman\\Service\\ShareService","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getItemAcl","class":"OCA\\Passman\\Controller\\ShareController","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ShareController","getItemAcl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08","passman.share.getItemAcl"]]},{"file":"/var/www/html/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/passman/api/v2/sharing/credential/24A8B12F-4020-4AB7-A56D-24A0C9F1FC08/acl"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php","Line":83,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[42803]: Grouping error: 7 ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":94,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::","args":[{"__class__":"PDOException","errorInfo":["42803",7,"ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^"]}]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1057,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = ? GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = :dcValue1 GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":294,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":336,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/custom_apps/passman/lib/Db/ShareRequestMapper.php","line":87,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/passman/lib/Service/ShareService.php","line":282,"function":"getRequestsByItemGuidGroupedByUser","class":"OCA\\Passman\\Db\\ShareRequestMapper","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/custom_apps/passman/controller/sharecontroller.php","line":447,"function":"getCredentialPendingAclList","class":"OCA\\Passman\\Service\\ShareService","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getItemAcl","class":"OCA\\Passman\\Controller\\ShareController","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ShareController","getItemAcl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08","passman.share.getItemAcl"]]},{"file":"/var/www/html/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/passman/api/v2/sharing/credential/24A8B12F-4020-4AB7-A56D-24A0C9F1FC08/acl"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":26,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42803]: Grouping error: 7 ERROR: column \"oc_passman_share_request.id\" must appear in the GROUP BY clause or be used in an aggregate function\nLINE 1: SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" =...\n ^","Code":"42803","Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":92,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1057,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = ? GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":345,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_passman_share_request\" WHERE \"item_guid\" = :dcValue1 GROUP BY \"target_user_id\"",["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"],[2]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":281,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":294,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/public/AppFramework/Db/QBMapper.php","line":336,"function":"executeQuery","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/custom_apps/passman/lib/Db/ShareRequestMapper.php","line":87,"function":"findEntities","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->","args":[{"__class__":"OC\\DB\\QueryBuilder\\QueryBuilder"}]},{"file":"/var/www/html/custom_apps/passman/lib/Service/ShareService.php","line":282,"function":"getRequestsByItemGuidGroupedByUser","class":"OCA\\Passman\\Db\\ShareRequestMapper","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/custom_apps/passman/controller/sharecontroller.php","line":447,"function":"getCredentialPendingAclList","class":"OCA\\Passman\\Service\\ShareService","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"getItemAcl","class":"OCA\\Passman\\Controller\\ShareController","type":"->","args":["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Passman\\Controller\\ShareController"},"getItemAcl"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ShareController","getItemAcl",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["24A8B12F-4020-4AB7-A56D-24A0C9F1FC08","passman.share.getItemAcl"]]},{"file":"/var/www/html/lib/base.php","line":1047,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/passman/api/v2/sharing/credential/24A8B12F-4020-4AB7-A56D-24A0C9F1FC08/acl"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":92}}},"CustomMessage":"--"},"id":"63dea481410f2"}