diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/appinfo/app.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/dav/appinfo/app.php b/apps/dav/appinfo/app.php index 0d417fd3fed..963073c4413 100644 --- a/apps/dav/appinfo/app.php +++ b/apps/dav/appinfo/app.php @@ -50,7 +50,13 @@ $eventDispatcher->addListener('OCP\Federation\TrustedServerEvent::remove', $cm = \OC::$server->getContactsManager(); $cm->register(function() use ($cm, $app) { $user = \OC::$server->getUserSession()->getUser(); - if (!is_null($user)) { - $app->setupContactsProvider($cm, $user->getUID()); + if (is_null($user)) { + return; } + if (\OC::$server->getConfig()->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') !== 'yes') { + // Don't include system users + // This prevents user enumeration in the contacts menu and the mail app + return; + } + $app->setupContactsProvider($cm, $user->getUID()); }); |