Skip to content

System address book registered in contacts manager may lead to data leakage #9058

@ChristophWurst

Description

@ChristophWurst

As discovered in the mail app, the dav app registers the system users address book for the contacts manager. If any app queries this manager, all personal and system-wide contacts can be retrieved, even if sharing options are configured to not suggest any other system users.

Ref nextcloud/mail#848 (comment)

public function search($pattern, $searchProperties = array(), $options = array()) {
$this->loadAddressBooks();
$result = array();
foreach($this->addressBooks as $addressBook) {
$r = $addressBook->search($pattern, $searchProperties, $options);
$contacts = array();
foreach($r as $c){
$c['addressbook-key'] = $addressBook->getKey();
$contacts[] = $c;
}
$result = array_merge($result, $contacts);
}
return $result;

public function setupContactsProvider(IManager $cm, $userId, IURLGenerator $urlGenerator) {
$addressBooks = $this->backend->getAddressBooksForUser("principals/users/$userId");
$this->register($cm, $addressBooks, $urlGenerator);
$this->setupSystemContactsProvider($cm, $urlGenerator);
}

cc @rullzer

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions