[Misc] Gate/scope user-directory enumeration on /users/search and /users/resolve#845
Open
chronoai-shining wants to merge 4 commits into
Open
Conversation
…utes (#816) Reject empty/1-char q via Zod min-length (env ORNN_USER_SEARCH_MIN_Q, default 2) and mount the existing per-user rateLimit middleware on both /users/search and /users/resolve (shared label users-directory, env ORNN_USER_DIRECTORY_RATELIMIT_PER_MIN / _WINDOW_MS, default 30/min). Repository empty-q branch intentionally untouched: admin/quota depends on it; the enumeration gate lives in the route. Build/tests run separately (scoped bun test + tsc, see PR).
Empty/1-char q must 400 without touching the repository; 2-char prefix resolves (typeahead positive control, email present); RL_MAX+1 bursts on /users/search and /users/resolve both 429 with RFC 9239 headers; shared users-directory label draws one per-user budget across routes.
…#816) The backend now 400s empty/1-char q on /users/search, so the picker no longer fires on bare focus; a small i18n'd hint asks for 2+ characters. Email stays the picker label — UserDirectoryEntry unchanged.
Collaborator
Author
|
auto-merge halted: ci-failure. Required checks did not reach a clean green state within policy; a human must intervene. (No force-push performed.) |
This was referenced Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #816
Automated change by
/auto(run20260604T121112Z-15019, runnerauto-runner-20260604T121112Z-15019-15019-21847).Base is hard-locked to
develop-auto; squash-merged when CI is 100% green.