Merge pull request #3541 from evazion/fix-3539

Fix #3539: Open redirect vulnerabilities
This commit is contained in:
Albert Yi
2018-03-08 16:02:02 -08:00
committed by GitHub
4 changed files with 37 additions and 17 deletions

View File

@@ -40,6 +40,14 @@ class TagsControllerTest < ActionController::TestCase
assert_response :success
end
end
context "with blank search parameters" do
should "strip the blank parameters with a redirect" do
get :index, { search: { name: "touhou", category: "" } }
assert_redirected_to tags_path(search: { name: "touhou" })
end
end
end
context "autocomplete action" do