Ruby 2.5.0 リファレンスマニュアル > ライブラリ一覧 > rexml/documentライブラリ > REXML::Securityモジュール > entity_expansion_text_limit

singleton method REXML::Security.entity_expansion_text_limit

entity_expansion_text_limit -> Integer[permalink][rdoc]

実体参照の展開による文字列の増分(テキストのバイト数)の最大値を指定します。

展開によって増分値がこの値を越えると例外を発生させ、処理を中断します。

実体参照の展開処理を使った DoS 攻撃に対抗するための仕組みです。

デフォルトは 10240 (byte) です。

[SEE_ALSO] REXML::Document.entity_expansion_text_limit=, http://www.ruby-lang.org/ja/news/2013/02/22/rexml-dos-2013-02-22/