Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable form data UTF-8 sanitisation #3386

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion lib/sanitiser/strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading