Skip to content

Commit 847753e

Browse files
authored
Merge pull request rails#54567 from flavorjones/flavorjones-document-sanitizer
doc: Explicitly state that modifying sanitizer allowlists is unsafe
2 parents 00cc4ff + 77a27d5 commit 847753e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

actionview/lib/action_view/helpers/sanitize_helper.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ module SanitizeHelper
2424
#
2525
# Custom sanitization rules can also be provided.
2626
#
27+
# <b>Warning</b>: Adding disallowed tags or attributes to the allowlists may introduce
28+
# vulnerabilities into your application. Please rely on the default allowlists whenever
29+
# possible, because they are curated to maintain security and safety. If you think that the
30+
# default allowlists should be expanded, please {open an issue on the rails-html-sanitizer
31+
# project}[https://github.com/rails/rails-html-sanitizer/issues].
32+
#
2733
# Please note that sanitizing user-provided text does not guarantee that the
2834
# resulting markup is valid or even well-formed.
2935
#

0 commit comments

Comments
 (0)