Skip to content

[Bug]: ContactsSearchProvider not respecting share enumeration #37799

@miaulalala

Description

@miaulalala

⚠️ 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 (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

The ContactsSearchProvider indiscriminately searches in all principal address books:

$searchResults = $this->backend->searchPrincipalUri(
			$principalUri,
			$query->getTerm(),
			self::$searchProperties,
			[
				'limit' => $query->getLimit(),
				'offset' => $query->getCursor(),
			]
		);

Unless the filtering is done somewhere else, the share enumeration that is defined in the Share API is not taken into account.

  • find out if the filtering is done somewhere else
  • if not, add the share enumeration filtering

Steps to reproduce


Expected behavior

Share enumeration is taken into account.

Installation method

Other Community project

Nextcloud Server version

master

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

--

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

☑️ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions