mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 19:52:43 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user