Skip to content

Commit

Permalink
doc: update ParseOptions::HUGE documentation for untrusted docs
Browse files Browse the repository at this point in the history
We've long documented this as a performance concern, when in reality
it's a security concern. Large untrusted documents can cause OOM
condition when the HUGE option is set.
  • Loading branch information
flavorjones committed Mar 7, 2024
1 parent f0cda8b commit 0b41d83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nokogiri/xml/parse_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class ParseOptions

# Relax any hardcoded limit from the parser. Off by default.
#
# ⚠ There may be a performance penalty when this option is set.
# ⚠ <b>It is UNSAFE to set this option</b> when parsing untrusted documents.
HUGE = 1 << 19

# Support line numbers up to <code>long int</code> (default is a <code>short int</code>). On
Expand Down

0 comments on commit 0b41d83

Please sign in to comment.