diff --git a/config/application.rb b/config/application.rb index f13f7a67d..4a375aff0 100644 --- a/config/application.rb +++ b/config/application.rb @@ -135,7 +135,6 @@ class Application < Rails::Application config.middleware.insert_before( 0, Rack::UTF8Sanitizer, - sanitizable_content_types: [], only: %w[QUERY_STRING], strategy: Sanitiser::Strategy, ) diff --git a/lib/sanitiser/strategy.rb b/lib/sanitiser/strategy.rb index fc2414343..19ecd35e0 100644 --- a/lib/sanitiser/strategy.rb +++ b/lib/sanitiser/strategy.rb @@ -11,7 +11,7 @@ def call(input, sanitize_null_bytes: false) raise NullByteInString end rescue StandardError - raise SanitisingError, "Non-UTF-8 (or null) character in the query or in the cookie" + raise SanitisingError, "Non-UTF-8 (or null) character in the query, cookie or form data" end end end