Searching items for % or _ matches more than was typed #296
Reference in New Issue
Block a user
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?
entries_from (crates/ipx/src/db.rs:1225) puts the search term into a LIKE pattern without escaping % and _, so a search for '100%' or 'a_b' treats them as wildcards. Found in a repo audit. Fix: escape them and add ESCAPE '\', which works on SQLite and Postgres.
Fixed in
44afc08: the search term's , % and _ are escaped and both LIKEs say ESCAPE '', on SQLite and Postgres. every_filter_works_with_and_without_a_search_term checks that each finds nothing in items without it. Deployed in ipx.