mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 00:43:24 +08:00
DEV: Ignore invalid tag parameter in TagsController (#28557)
This had no effect in the app, but it was resulting in errors in the logs.
This commit is contained in:
parent
f405c021eb
commit
ee3b175373
|
@ -585,6 +585,6 @@ class TagsController < ::ApplicationController
|
|||
end
|
||||
|
||||
def tag_params
|
||||
Array(params[:tags]).concat(Array(@additional_tags))
|
||||
Array(params[:tags]).map(&:to_s).concat(Array(@additional_tags))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -518,6 +518,11 @@ RSpec.describe TagsController do
|
|||
expect(topic_ids).to_not include(topic_in_subcategory_without_tag.id)
|
||||
end
|
||||
end
|
||||
|
||||
it "should ignore invalid tag parameter" do
|
||||
get "/tag/test.json?tags[0]=nada"
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#info" do
|
||||
|
|
Loading…
Reference in New Issue
Block a user