fix: improve compliance name search#3374
Merged
TaprootFreak merged 6 commits intodevelopfrom Mar 10, 2026
Merged
Conversation
…dling The name search only tried splitting input as "firstname surname" but not the reversed order. Searching "Surname Firstname" would fail to find a user stored as firstname=Firstname, surname=Surname. Now tries all possible split points in both orders and additionally strips title-like words ending with "." (e.g. "Dr.", "Prof.") for an extra set of split combinations without discarding the original input.
The BankTx name search had the same reversed-order issue. Now also tries reversed splits and title-filtered variants for the name and ultimateName fields.
Limit split parts to 5 to prevent unbounded iteration over user-controlled input (CodeQL js/loop-bound-injection). 5 parts covers any realistic name including titles.
9954206 to
d06ff14
Compare
Prevents bad LIKE queries from double-space input (e.g. "%%" matching everything).
…al name from comment
698236f to
1f52791
Compare
davidleomay
approved these changes
Mar 10, 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.
Summary
getUsersByName) now tries all possible split points in both firstname/surname orders, so reversed name input (e.g. "Surname Firstname") finds the same results as "Firstname Surname".(e.g. "Dr.", "Prof.") for extra split combinations without discarding the original inputgetBankTxsByName): reversed splits and title-filtered full-string search fornameandultimateNamefieldsTest plan