mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-17 01:40:42 -07:00
Limit how much blocks can be nested during parsing (#894)
This commit is contained in:
committed by
GitHub
parent
62d4625468
commit
9c72ccb82f
@@ -1,12 +1,13 @@
|
||||
module Liquid
|
||||
class ParseContext
|
||||
attr_accessor :locale, :line_number, :trim_whitespace
|
||||
attr_accessor :locale, :line_number, :trim_whitespace, :depth
|
||||
attr_reader :partial, :warnings, :error_mode
|
||||
|
||||
def initialize(options = {})
|
||||
@template_options = options ? options.dup : {}
|
||||
@locale = @template_options[:locale] ||= I18n.new
|
||||
@warnings = []
|
||||
self.depth = 0
|
||||
self.partial = false
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user