[Bug]: Sharing with additionally added e-mail addresses not possible (bug 2) #49257
Open
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
user A tries to share by searching for the email "test@example.com" and gets no result, also https://github.com/nextcloud/server/blob/master/lib/private/Collaboration/Collaborators/MailPlugin.php#L151 returns instead of continuing with the next user
Steps to reproduce
1, have the share by mail app disabled
2. user A adds an additional email address "test@example.com"
3. user B adds an additional email address "test@example.com"
4. Limit sharing autocompletion to only work on exact matches of email
- user A tries to share by searching for the email "test@example.com" and gets no result, would expect user B, but https://github.com/nextcloud/server/blob/master/lib/private/Collaboration/Collaborators/MailPlugin.php#L151 returns instead of continuing with the next user
Expected behavior
user A tries to share by searching for the email "test@example.com", would expect user B.
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
List of activated Apps
Enabled:
- activity: 2.19.0
- announcementcenter: 6.8.1
- bruteforcesettings: 2.7.0
- calendar: 4.7.7
- circles: 27.0.1
- cloud_federation_api: 1.10.0
- comments: 1.17.0
- contacts: 5.5.3
- contactsinteraction: 1.8.0
- dav: 1.27.1
- deck: 1.11.5
- encryption: 2.15.0
- external: 5.2.1
- federatedfilesharing: 1.17.0
- files: 1.22.0
- files_accesscontrol: 1.17.2
- files_automatedtagging: 1.17.0
- files_markdown: 2.4.1
- files_pdfviewer: 2.8.0
- files_readmemd: 2.0.1
- files_reminders: 1.0.0
- files_retention: 1.16.0
- files_rightclick: 1.6.0
- files_sharing: 1.19.0
- files_texteditor: 2.15.1
- files_trashbin: 1.17.0
- files_versions: 1.20.0
- firstrunwizard: 2.16.0
- groupfolders: 15.3.8
- guests: 2.5.2
- impersonate: 1.14.0
- logreader: 2.12.0
- lookup_server_connector: 1.15.0
- notifications: 2.15.0
- oauth2: 1.15.2
- onlyoffice: 9.2.2
- password_policy: 1.17.0
- photos: 2.3.0
- privacy: 1.11.0
- provisioning_api: 1.17.0
- recommendations: 1.6.0
- related_resources: 1.2.0
- sendent: 3.0.10
- serverinfo: 1.17.0
- settings: 1.9.0
- sharelisting: 1.2.0
- support: 1.10.1
- systemtags: 1.17.0
- terms_of_service: 2.3.1
- text: 3.8.1
- theming: 2.2.0
- theming_customcss: 1.16.0
- twofactor_backupcodes: 1.16.0
- twofactor_totp: 9.0.0
- updatenotification: 1.17.0
- user_saml: 5.2.7
- viewer: 2.1.0
- workflowengine: 2.9.0
Disabled:
- admin_audit
- approval
- dashboard: 7.0.0
- email_template_example: 0.0.1
- federation: 1.8.0
- files_confidential
- files_external
- files_lock
- globalsiteselector
- integration_openproject
- nextcloud_announcements: 1.7.0
- officeonline
- richdocuments
- sharebymail: 1.8.0
- survey_client: 1.6.0
- suspicious_login
- user_ldap
- user_status: 1.0.1
- weather_status: 1.0.0
Nextcloud Signing status
Nextcloud Logs
{"reqId":"nC1HGyw0IydUigp6mVJf","level":3,"time":"July 09, 2024 14:35:08","remoteAddr":"XXXX","user":"XXXXX","app":"webdav","method":"GET","url":"/remote.php/dav/files/XXXX/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","message":"fread(): Argument #2 ($length) must be greater than 0","userAgent":"Mozilla/5.0 (Windows) mirall/3.13.1stable-Win64 (build 20240701) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.11.4","exception":{"Exception":"ValueError","Message":"fread(): Argument #2 ($length) must be greater than 0","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","line":55,"function":"fread","args":[null,0]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":351,"function":"stream_read","class":"Icewind\\Streams\\Wrapper","type":"->","args":[0]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":537,"function":"stream_read_block","class":"OC\\Files\\Stream\\Encryption","type":"->","args":[0]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":299,"function":"skipHeader","class":"OC\\Files\\Stream\\Encryption","type":"->","args":[]},{"function":"stream_open","class":"OC\\Files\\Stream\\Encryption","type":"->","args":["ocencryption://","r",0,null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":212,"function":"fopen","args":["ocencryption://","r",false,null]},{"file":"/var/www/nextcloud/lib/private/Files/Stream/Encryption.php","line":187,"function":"wrapSource","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,null,"ocencryption","OC\\Files\\Stream\\Encryption","r"]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Encryption.php","line":483,"function":"wrap","class":"OC\\Files\\Stream\\Encryption","type":"::","args":[null,"files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","/XXXX/files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf",["OC_DEFAULT_MODULE"],"XXX",["OCA\\Encryption\\Crypto\\Encryption"],["OC\\Files\\Storage\\Wrapper\\Quota",null,null,null,null,null],["OC\\Files\\Storage\\Wrapper\\Encryption",null,null,null,null,null],["OC\\Encryption\\Util"],["OC\\Encryption\\File"],"r",0,0,0,false]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":307,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Encryption","type":"->","args":["files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","r"]},{"file":"/var/www/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php","line":237,"function":"fopen","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","r"]},{"file":"/var/www/nextcloud/apps/terms_of_service/lib/Filesystem/StorageWrapper.php","line":82,"function":"fopen","class":"OCA\\FilesAccessControl\\StorageWrapper","type":"->","args":["files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","r"]},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1165,"function":"fopen","class":"OCA\\TermsOfService\\Filesystem\\StorageWrapper","type":"->","args":["files/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","r"]},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":993,"function":"basicOperation","class":"OC\\Files\\View","type":"->","args":["fopen","/Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf",["read"],"r"]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":492,"function":"fopen","class":"OC\\Files\\View","type":"->","args":["Promotion/Approach_Expose/Indikatorenset/Landschaft/Zwischenergebnisse/focal1m/focal1m_son/hdr.adf","r"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:GET",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":371,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":172,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/3rdparty/icewind/streams/src/Wrapper.php","Line":55,"message":"fread(): Argument #2 ($length) must be greater than 0","exception":{},"CustomMessage":"fread(): Argument #2 ($length) must be greater than 0"}}
Additional info
- The logging patch showed that listing the search results was actually canceled at the point when the current user searching was matched, which pointed to that both test users had the email in place
- After removing that email and having the "share by mail" app enabled we did get the search results as expected.
Activity