discourse/config/initializers/100-regex-timeout.rb
David Taylor a0140f6f75
DEV: Introduce regex_timeout_seconds global setting (#20774)
This is introduced as `nil` by default. We intend to set a sensible default once we have performed some real-world testing.
2023-03-22 12:01:35 +00:00

5 lines
139 B
Ruby

# frozen_string_literal: true
Regexp.timeout =
GlobalSetting.regex_timeout_seconds.to_i if GlobalSetting.regex_timeout_seconds.present?