FIX: stop logging every time invalid params are sent

Previously we were logging warning for invalid encoded params, this can
cause a log flood
This commit is contained in:
Sam
2018-10-05 14:33:08 +10:00
parent da39a310c3
commit 5b630f3188
3 changed files with 36 additions and 1 deletions

View File

@ -16,6 +16,10 @@ module Middleware
exception = env["action_dispatch.exception"]
response = ActionDispatch::Response.new
# Special handling for invalid params, in this case we can not re-dispatch
# the Request object has a "broken" .params which can not be accessed
exception = nil if Rack::QueryParser::InvalidParameterError === exception
if exception
begin
fake_controller = ApplicationController.new