about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-01-24 00:20:03 +0100
committerGitHub <noreply@github.com>2020-01-24 00:20:03 +0100
commitdee853f23c65988d505796d11ac71c0fd2f8053e (patch)
treebb91b9e1dc3ad8adde786f11af46dc2b68376048 /app
parent105f83fc1e4830186e9d7cb91c5d4fda1798c602 (diff)
Remove bad encoding middleware (#12931)
Revert #12741
Diffstat (limited to 'app')
-rw-r--r--app/middleware/handle_bad_encoding_middleware.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/app/middleware/handle_bad_encoding_middleware.rb b/app/middleware/handle_bad_encoding_middleware.rb
deleted file mode 100644
index 6fce84b15..000000000
--- a/app/middleware/handle_bad_encoding_middleware.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-# frozen_string_literal: true
-# See: https://jamescrisp.org/2018/05/28/fixing-invalid-query-parameters-invalid-encoding-in-a-rails-app/
-
-class HandleBadEncodingMiddleware
-  def initialize(app)
-    @app = app
-  end
-
-  def call(env)
-    begin
-      Rack::Utils.parse_nested_query(env['QUERY_STRING'].to_s)
-    rescue Rack::Utils::InvalidParameterError
-      env['QUERY_STRING'] = ''
-    end
-
-    @app.call(env)
-  end
-end