Skip to content

Conversation

@tomneedham
Copy link
Contributor

Description

If you setup your instance to not allow user enumeration, but try to search for a user by one of their configured search terms, we should count this as an exact match.

Motivation and Context

If you have multiple email addresses, these can be configured as search terms with the LDAP app and this PR allows you to find other users using these email addresses (terms) as exact matches when enumeration is disabled.

How Has This Been Tested?

Locally with LDAP server + PHPUnit test

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Working on improved testing for the mo...

@tomneedham tomneedham added this to the development milestone Aug 28, 2017
@tomneedham tomneedham self-assigned this Aug 28, 2017
@tomneedham tomneedham requested review from PVince81 and butonic August 28, 2017 12:59
Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 makes sense, indeed the search terms were missing in that condition.

Please check the test failure in "OCA\Files_Sharing\Tests\API\ShareesTest.testGetUserWithSearchAttributes"

@tomneedham tomneedham force-pushed the sharee-search-exact-term branch from 933229f to 70c1305 Compare August 28, 2017 14:11
@PVince81
Copy link
Contributor

16:13:52 1) OCA\Files_Sharing\Tests\API\ShareesTest::testGetUserWithSearchAttributes
16:13:52 Failed asserting that two arrays are equal.
16:13:52 --- Expected
16:13:52 +++ Actual
16:13:52 @@ @@
16:13:52  Array (
16:13:52 -    0 => Mock_IUser_60b22220 Object (...)
16:13:52  )
16:13:52 
16:13:52 /var/lib/jenkins/workspace/owncloud-core_core_PR-28818-HIRUNODPUCROLXW6MREEYKRWHEEXAPCS2RJ7PHMKKBHJKA7VPTHA/apps/files_sharing/tests/API/ShareesTest.php:1829

@tomneedham tomneedham force-pushed the sharee-search-exact-term branch from 70c1305 to c987e01 Compare August 29, 2017 10:13
@PVince81 PVince81 merged commit 1ada666 into master Aug 29, 2017
@PVince81 PVince81 deleted the sharee-search-exact-term branch August 29, 2017 13:22
@PVince81
Copy link
Contributor

please backport

@lock
Copy link

lock bot commented Aug 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants