[loggi-8q5] Escape SQL LIKE wildcards in record search #120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bead ID:
loggi-8q5Type: bug
Priority: P2
Status: closed
Close reason: Added escape for SQL LIKE wildcards (%, _, ) in record text search query in routes.py. Uses ilike with explicit escape='' parameter. Added test_records_search_escapes_like_wildcards test.
In routes.py entry_records(), the search query uses ilike(f'%{search_q}%') but doesn't escape % and _ characters in user input. Users can inject LIKE wildcards (e.g. searching for '%' matches everything). Escape these characters before building the LIKE pattern.