Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

User directory does not appear to return users who are not in a public room, regardless of user_directory.search_all_users value #11104

Closed
benparsons opened this issue Oct 18, 2021 · 5 comments
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@benparsons
Copy link
Member

Description

We added the following settings to homeserver.yaml:

user_directory:
  enabled: true
  search_all_users: true

Then searched for a user who was not in a shared room or any public room. The targe user was not returned by the search.

Steps to reproduce

  • New instance. Create user_a, user_b.
  • Enter the following in homeserver.yaml:
user_directory:
  enabled: true
  search_all_users: true
  • user_a searches for user_b, cannot find them by mxid or display name
  • user_b creates a new public room, joins it
  • user_a and user_b still do not share a room
  • user_a searches for user_b, finds them

Version information

  • Homeserver: Synapse 1.27

If not matrix.org: private customer

  • Version: Synapse 1.27

  • Install method:

  • Platform: k8s
@DMRobertson DMRobertson added S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Oct 18, 2021
@DMRobertson
Copy link
Contributor

Up until recently, after setting search_all_users on you had to manually rebuild the user directory to include these users. Instructions to do so are in the second paragraph here.

I think any users created after search_all_users is set True and Synapse is restarted should show up in the directory, even if they're in zero rooms.

The reproduction steps should not cause the bug as of #10796, which was included in Synapse 1.44.

(Aside: Synapse 1.27 is old and contains known security vulnerabilities.)

@DMRobertson
Copy link
Contributor

DMRobertson commented Oct 18, 2021

@benparsons, is rebuilding the directory a good-enough workaround for the customers who have encountered this? If so I'd err towards closing given that this should be fixed in 1.44. (If you get the chance to independently verify the fix that'd be much appreciated too!)

@benparsons
Copy link
Member Author

@DMRobertson thanks. We had been rebuilding the user directory, forgot to mention that.

But, it sounds like #10796 should solve this, I will recommend upgrading to 1.44, then confirm.

@DMRobertson
Copy link
Contributor

Thanks @benparsons! I'm more than happy to take another look, if things aren't working out on a newer version of Synapse.

@DMRobertson DMRobertson added the X-Needs-Info This issue is blocked awaiting information from the reporter label Oct 18, 2021
@richvdh
Copy link
Member

richvdh commented Jan 4, 2022

assuming this is no longer an issue

@richvdh richvdh closed this as completed Jan 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Minor Blocks non-critical functionality, workarounds exist. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

3 participants