Merge branch 'dz-clarify-constrainer-query' into 'master'

Explain why we use select all for project_url_constrainer.rb

See merge request !13425
This commit is contained in:
Sean McGivern 2017-08-09 13:48:55 +00:00
commit 705dbe6162
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@ class ProjectUrlConstrainer
return false unless DynamicPathValidator.valid_project_path?(full_path)
# We intentionally allow SELECT(*) here so result of this query can be used
# as cache for further Project.find_by_full_path calls within request
Project.find_by_full_path(full_path, follow_redirects: request.get?).present?
end
end