Skip to content

fix(query): escape LIKE wildcards in contributor search - #57

Merged
kshitijrajsharma merged 1 commit into
osgeonepal:masterfrom
NirrWorks:fix/leaderboard-search-wildcards
Aug 13, 2026
Merged

fix(query): escape LIKE wildcards in contributor search#57
kshitijrajsharma merged 1 commit into
osgeonepal:masterfrom
NirrWorks:fix/leaderboard-search-wildcards

Conversation

@NirrWorks

Copy link
Copy Markdown
Contributor

The leaderboard q search interpolated user input straight into a LIKE pattern, so _ matched any character and % any sequence: q=a_il returned "Anil Basnet" and a bare q=% returned the entire leaderboard instead of nothing.

Not injection, the query was already parameterised. Escape %, _ and the escape character itself, paired with ESCAPE at the call site.

The leaderboard `q` search interpolated user input straight into a LIKE
pattern, so `_` matched any character and `%` any sequence: q=a_il returned
"Anil Basnet" and a bare q=% returned the entire leaderboard instead of
nothing.

Not injection, the query was already parameterised. Escape `%`, `_` and the
escape character itself, paired with ESCAPE at the call site.

Adds a regression test; it fails on the parent commit.
@kshitijrajsharma
kshitijrajsharma merged commit 73cdb5b into osgeonepal:master Aug 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants