Skip to content

Escape route path for LIKE queries

Jarka Kadlecova requested to merge jarka/gitlab-ce:29583-routes-like-fix into master

What does this MR do?

Fixes queries where LIKE 'path' clause is being used. In case there was _` inside the path and there was another entity with the similar name the queries would return incorrect results

Eg. SELECT FROM routes WHERE path like 'git_lab%' would return entity with git_lab in path but also eg. gittlab.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #29583

Merge request reports