mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: Require q param in /tags/filter/search route (#8263)
* Require q param in /tags/filter/search route. * If not provided this route was causing a 500 error when DiscourseTagging.clean_tag was called, because .downcase was being called on the param (which was nil). * Now return a 400 error instead.
This commit is contained in:
@ -193,6 +193,8 @@ class TagsController < ::ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
params.require(:q)
|
||||
|
||||
clean_name = DiscourseTagging.clean_tag(params[:q])
|
||||
category = params[:categoryId] ? Category.find_by_id(params[:categoryId]) : nil
|
||||
|
||||
|
Reference in New Issue
Block a user