From 2ab42c7b5e674453fac0320fe0c4a40daf6197e1 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 21 Jul 2013 18:53:41 +0200 Subject: prevent Symbol attack in Debug scanner --- test/unit/debug.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/unit/debug.rb b/test/unit/debug.rb index f2b80bd..616cda5 100644 --- a/test/unit/debug.rb +++ b/test/unit/debug.rb @@ -18,15 +18,15 @@ class DebugEncoderTest < Test::Unit::TestCase [:begin_group, :string], ['test', :content], [:end_group, :string], - [:begin_line, :test], + [:begin_line, :head], ["\n", :space], ["\n \t", :space], [" \n", :space], ["[]", :method], - [:end_line, :test], + [:end_line, :head], ].flatten TEST_OUTPUT = <<-'DEBUG'.chomp -integer(10)operator((\\\))stringtest[ +integer(10)operator((\\\))stringhead[ method([])] @@ -51,7 +51,7 @@ class DebugScannerTest < Test::Unit::TestCase end TEST_INPUT = <<-'DEBUG'.chomp -integer(10)operator((\\\))stringtest[ +integer(10)operator((\\\))stringhead[ method([])] @@ -62,10 +62,10 @@ method([])] [:begin_group, :string], ['test', :content], [:end_group, :string], - [:begin_line, :test], + [:begin_line, :head], ["\n\n \t \n", :space], ["[]", :method], - [:end_line, :test], + [:end_line, :head], ].flatten def test_filtering_text_tokens -- cgit v1.2.1