Skip to content
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

This app does not respect the "Allow sharing with groups"-setting #6017

Closed
pierreozoux opened this issue Feb 8, 2022 · 4 comments · Fixed by #7084
Closed

This app does not respect the "Allow sharing with groups"-setting #6017

pierreozoux opened this issue Feb 8, 2022 · 4 comments · Fixed by #7084

Comments

@pierreozoux
Copy link
Member

Expected behavior

Given the following settings

Screenshot from 2022-02-08 14-23-03

When you write a new email, you shouldn't be proposed autocompletion emails from users from groups you are not in.

Actual behavior

It does propose you all the emails of the instance.

Steps to reproduce

  1. configure the sharing settings like in the screenshot
  2. create a new email
  3. start to type in the to field and get autocompletion proposition from users outside your groups.

Mail app version

1.11.6

Mailserver or service

Not relevant.

Operating system

Not relevant.

PHP engine version

Other

Web server

Other

Database

Other

Additional info

Relates to this bug:
nextcloud/server#25390

On shared instance, this is a privacy issue.

@kesselb
Copy link
Contributor

kesselb commented May 20, 2022

Hey @pierreozoux 👋

I need some help with your bug report.

Sharing Settings

image

Users & Groups

image

Test Case 1

  • Login as alice
  • Write a new message
Input To Suggestion
bob -
john -
house House Greyjoy (Nextcloud)
House Stark (Nextcloud)
night Night's Watch (Nextcloud)
admin admin (Nextcloud)

* (Nextcloud) = Group in Nextcloud

Test Case 2

  • Login as alice
  • Write a new message to join@nightswatch.got
  • Sent the message
  • Open write a new message again
Input To Suggestion
night join@nightswatch.got
Night's Watch (Nextcloud)

join@nightswatch.got is returned by the address collector (as we wrote an email earlier)

Night's Watch (Nextcloud) = Group in Nextcloud

Test Case 3

  • Login as alice
  • Open contacts
  • Add a new contact Robb Stark with email robb@stark.got
  • Open mail
  • Write a new message
Input To Suggestion
robb Robb Stark (robb@stark.got)

Robb Stark (robb@stark.got) is a direct match from contacts then

Test Case 1, 2 and 3 look okay. I also had a quick look at the auto completion service. We use three sources: Contacts, Groups and collected addresses.

Can you share some more details how to reproduce it 🤔

@unteem
Copy link

unteem commented Aug 24, 2022

Hi @kesselb

This looks definitely like a duplicate of #6148

I'll answer for @pierreozoux

Its weird I cannot replicate on a fresh install but on our current install we do have the issue of the autocompletion settings being ignored...

If I allow auto-completion for users in the same groups:
I should only see users from that group in the autocompletion when I start to type a recipient
What I actually see is an auto-completion of all the users in the instance.

Can it be something that is messed up during an upgrade when there was this issues ? We still have some stuff in the db that should be cleaned up ?

Nextcloud version 23.0.7
Mail verison 1.13.7

Thanks

@hrenard
Copy link
Contributor

hrenard commented Aug 25, 2022

Hi @kesselb,

As I understand it, the ContactsManager (lib/private) is not responsible for filtering the results. Then, I don't see how the code would filter by groups as it only filters on shareapi_allow_share_dialog_user_enumeration.

$allowSystemUsers = $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'no') === 'yes';
$result = $this->contactsManager->search($term, ['FN', 'EMAIL']);
$receivers = [];
foreach ($result as $r) {
if (!$allowSystemUsers && isset($r['isLocalSystemBook']) && $r['isLocalSystemBook']) {
continue;
}

I believe we need something like this.

Have I missed something ?

Thanks !

@ChristophWurst
Copy link
Member

Label dropped because it was a duplicate of the attribute at https://github.com/orgs/nextcloud/projects/61. The priority does not change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

6 participants