json_pure 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,11 @@
1
+ 2009-06-29 (1.1.7)
2
+ * Security Fix for JSON::Pure::Parser. A specially designed string could
3
+ cause catastrophic backtracking in one of the parser's regular expressions
4
+ in earlier 1.1.x versions. JSON::Ext::Parser isn't affected by this issue.
5
+ Thanks to Bartosz Blimke <bartosz@new-bamboo.co.uk> for reporting this
6
+ problem.
7
+ * This release also uses a less strict ruby version requirement for the
8
+ creation of the mswin32 native gem.
1
9
  2009-05-10 (1.1.6)
2
10
  * No changes. І tested native linux gems in the last release and they don't
3
11
  play well with different ruby versions other than the one the gem was built
data/Rakefile CHANGED
@@ -134,11 +134,13 @@ task :test => [ :test_pure, :test_ext ]
134
134
 
135
135
  desc "Benchmarking parser"
136
136
  task :benchmark_parser do
137
+ ENV['RUBYOPT'] = "-Ilib:ext #{ENV['RUBYOPT']}"
137
138
  ruby 'benchmarks/parser_benchmark.rb'
138
139
  end
139
140
 
140
141
  desc "Benchmarking generator"
141
142
  task :benchmark_generator do
143
+ ENV['RUBYOPT'] = "-Ilib:ext #{ENV['RUBYOPT']}"
142
144
  ruby 'benchmarks/generator_benchmark.rb'
143
145
  end
144
146
 
@@ -160,7 +162,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
160
162
  s.name = 'json_pure'
161
163
  s.version = PKG_VERSION
162
164
  s.summary = "A JSON implementation in Ruby"
163
- s.description = ""
165
+ s.description = "This is a JSON implementation in pure Ruby."
164
166
 
165
167
  s.files = PKG_FILES
166
168
 
@@ -191,7 +193,7 @@ if defined?(Gem) and defined?(Rake::GemPackageTask) and defined?(Rake::Extension
191
193
  s.name = 'json'
192
194
  s.version = PKG_VERSION
193
195
  s.summary = "A JSON implementation as a Ruby extension"
194
- s.description = ""
196
+ s.description = "This is a JSON implementation as a Ruby extension in C."
195
197
 
196
198
  s.files = PKG_FILES
197
199
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.6
1
+ 1.1.7
@@ -496,7 +496,7 @@ static VALUE cState_s_allocate(VALUE klass)
496
496
  * Configure this State instance with the Hash _opts_, and return
497
497
  * itself.
498
498
  */
499
- static inline VALUE cState_configure(VALUE self, VALUE opts)
499
+ static VALUE cState_configure(VALUE self, VALUE opts)
500
500
  {
501
501
  VALUE tmp;
502
502
  GET_STATE(self);
@@ -6,9 +6,11 @@ module JSON
6
6
  # into a Ruby data structure.
7
7
  class Parser < StringScanner
8
8
  STRING = /" ((?:[^\x0-\x1f"\\] |
9
+ # escaped special characters:
9
10
  \\["\\\/bfnrt] |
10
11
  \\u[0-9a-fA-F]{4} |
11
- \\[\x20-\xff])*)
12
+ # match all but escaped special characters:
13
+ \\[\x20-\x21\x23-\x2e\x30-\x5b\x5d-\x61\x63-\x65\x67-\x6d\x6f-\x71\x73\x75-\xff])*)
12
14
  "/nx
13
15
  INTEGER = /(-?0|-?[1-9]\d*)/
14
16
  FLOAT = /(-?
data/lib/json/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module JSON
2
2
  # JSON version
3
- VERSION = '1.1.6'
3
+ VERSION = '1.1.7'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_pure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-10 00:00:00 +02:00
12
+ date: 2009-06-30 00:00:00 +02:00
13
13
  default_executable: edit_json.rb
14
14
  dependencies: []
15
15
 
16
- description: ""
16
+ description: This is a JSON implementation in pure Ruby.
17
17
  email: flori@ping.de
18
18
  executables:
19
19
  - edit_json.rb
@@ -23,142 +23,124 @@ extensions: []
23
23
  extra_rdoc_files: []
24
24
 
25
25
  files:
26
+ - RUBY
27
+ - CHANGES
28
+ - bin/edit_json.rb
29
+ - bin/prettify_json.rb
30
+ - VERSION
26
31
  - GPL
27
- - tests
28
- - tests/test_json_unicode.rb
29
- - tests/test_json.rb
30
- - tests/test_json_addition.rb
31
- - tests/fixtures
32
- - tests/fixtures/fail1.json
33
- - tests/fixtures/fail18.json
34
- - tests/fixtures/fail13.json
35
- - tests/fixtures/fail3.json
36
- - tests/fixtures/fail10.json
37
- - tests/fixtures/fail6.json
38
- - tests/fixtures/fail20.json
39
- - tests/fixtures/pass1.json
40
- - tests/fixtures/fail28.json
41
- - tests/fixtures/fail21.json
42
- - tests/fixtures/pass26.json
43
- - tests/fixtures/fail22.json
44
- - tests/fixtures/pass15.json
45
- - tests/fixtures/fail11.json
46
- - tests/fixtures/fail19.json
47
- - tests/fixtures/fail2.json
48
- - tests/fixtures/fail8.json
49
- - tests/fixtures/pass16.json
50
- - tests/fixtures/fail24.json
51
- - tests/fixtures/fail23.json
52
- - tests/fixtures/pass3.json
53
- - tests/fixtures/fail7.json
54
- - tests/fixtures/pass2.json
55
- - tests/fixtures/pass17.json
56
- - tests/fixtures/fail14.json
57
- - tests/fixtures/fail9.json
58
- - tests/fixtures/fail12.json
59
- - tests/fixtures/fail27.json
60
- - tests/fixtures/fail4.json
61
- - tests/fixtures/fail5.json
62
- - tests/fixtures/fail25.json
63
- - tests/test_json_generate.rb
64
- - tests/test_json_rails.rb
65
- - tests/test_json_fixtures.rb
66
- - install.rb
67
- - ext
68
- - ext/json
69
- - ext/json/ext
70
- - ext/json/ext/generator
71
- - ext/json/ext/generator/unicode.h
32
+ - TODO
33
+ - README
34
+ - benchmarks/parser_benchmark.rb
35
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
36
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
37
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
38
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
39
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
40
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
41
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
42
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
43
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
44
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
45
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
46
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
47
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
48
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
49
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
50
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
51
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
52
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
53
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
54
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
55
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
56
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
57
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
58
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
59
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
60
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
61
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
62
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
63
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
64
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
65
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
66
+ - benchmarks/generator_benchmark.rb
72
67
  - ext/json/ext/generator/extconf.rb
73
- - ext/json/ext/generator/generator.c
74
68
  - ext/json/ext/generator/unicode.c
75
- - ext/json/ext/parser
76
- - ext/json/ext/parser/unicode.h
77
- - ext/json/ext/parser/parser.rl
69
+ - ext/json/ext/generator/generator.c
70
+ - ext/json/ext/generator/unicode.h
78
71
  - ext/json/ext/parser/extconf.rb
79
- - ext/json/ext/parser/parser.c
72
+ - ext/json/ext/parser/parser.rl
80
73
  - ext/json/ext/parser/unicode.c
81
- - VERSION
82
- - README
83
- - tools
84
- - tools/server.rb
74
+ - ext/json/ext/parser/parser.c
75
+ - ext/json/ext/parser/unicode.h
76
+ - Rakefile
85
77
  - tools/fuzz.rb
86
- - lib
78
+ - tools/server.rb
79
+ - doc-templates/main.txt
87
80
  - lib/json.rb
88
- - lib/json
89
- - lib/json/add
90
- - lib/json/add/core.rb
91
- - lib/json/add/rails.rb
92
- - lib/json/ext.rb
81
+ - lib/json/json.xpm
93
82
  - lib/json/Key.xpm
94
- - lib/json/Array.xpm
95
- - lib/json/common.rb
96
- - lib/json/ext
97
- - lib/json/Hash.xpm
98
83
  - lib/json/String.xpm
99
- - lib/json/FalseClass.xpm
100
84
  - lib/json/Numeric.xpm
101
- - lib/json/version.rb
102
- - lib/json/pure
85
+ - lib/json/Hash.xpm
86
+ - lib/json/add/rails.rb
87
+ - lib/json/add/core.rb
88
+ - lib/json/common.rb
89
+ - lib/json/Array.xpm
90
+ - lib/json/FalseClass.xpm
103
91
  - lib/json/pure/generator.rb
104
92
  - lib/json/pure/parser.rb
93
+ - lib/json/TrueClass.xpm
105
94
  - lib/json/pure.rb
106
- - lib/json/NilClass.xpm
107
- - lib/json/json.xpm
95
+ - lib/json/version.rb
96
+ - lib/json/ext.rb
108
97
  - lib/json/editor.rb
109
- - lib/json/TrueClass.xpm
110
- - TODO
111
- - data
112
- - data/prototype.js
113
- - data/index.html
98
+ - lib/json/NilClass.xpm
114
99
  - data/example.json
115
- - bin
116
- - bin/prettify_json.rb
117
- - bin/edit_json.rb
118
- - diagrams
119
- - doc-templates
120
- - doc-templates/main.txt
121
- - RUBY
122
- - benchmarks
123
- - benchmarks/data-p4-3GHz-ruby18
124
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
125
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
126
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
127
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
128
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
129
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
130
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
131
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
132
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
133
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
134
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
135
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
136
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
137
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
138
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
139
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
140
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
141
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
142
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
143
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
144
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
145
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
146
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
147
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
148
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
149
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
150
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
151
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
152
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
153
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
154
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
155
- - benchmarks/data
156
- - benchmarks/parser_benchmark.rb
157
- - benchmarks/generator_benchmark.rb
158
- - Rakefile
159
- - CHANGES
100
+ - data/index.html
101
+ - data/prototype.js
102
+ - tests/test_json_addition.rb
103
+ - tests/fixtures/pass16.json
104
+ - tests/fixtures/fail4.json
105
+ - tests/fixtures/fail1.json
106
+ - tests/fixtures/fail28.json
107
+ - tests/fixtures/fail8.json
108
+ - tests/fixtures/fail19.json
109
+ - tests/fixtures/pass2.json
110
+ - tests/fixtures/pass26.json
111
+ - tests/fixtures/pass1.json
112
+ - tests/fixtures/fail3.json
113
+ - tests/fixtures/fail20.json
114
+ - tests/fixtures/pass3.json
115
+ - tests/fixtures/pass15.json
116
+ - tests/fixtures/fail12.json
117
+ - tests/fixtures/fail13.json
118
+ - tests/fixtures/fail22.json
119
+ - tests/fixtures/fail24.json
120
+ - tests/fixtures/fail9.json
121
+ - tests/fixtures/fail2.json
122
+ - tests/fixtures/fail14.json
123
+ - tests/fixtures/fail6.json
124
+ - tests/fixtures/fail21.json
125
+ - tests/fixtures/fail7.json
126
+ - tests/fixtures/pass17.json
127
+ - tests/fixtures/fail11.json
128
+ - tests/fixtures/fail25.json
129
+ - tests/fixtures/fail5.json
130
+ - tests/fixtures/fail18.json
131
+ - tests/fixtures/fail27.json
132
+ - tests/fixtures/fail10.json
133
+ - tests/fixtures/fail23.json
134
+ - tests/test_json_rails.rb
135
+ - tests/test_json.rb
136
+ - tests/test_json_generate.rb
137
+ - tests/test_json_unicode.rb
138
+ - tests/test_json_fixtures.rb
139
+ - install.rb
160
140
  has_rdoc: true
161
141
  homepage: http://json.rubyforge.org
142
+ licenses: []
143
+
162
144
  post_install_message:
163
145
  rdoc_options:
164
146
  - --title
@@ -183,14 +165,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
165
  requirements: []
184
166
 
185
167
  rubyforge_project: json
186
- rubygems_version: 1.3.1
168
+ rubygems_version: 1.3.2
187
169
  signing_key:
188
- specification_version: 2
170
+ specification_version: 3
189
171
  summary: A JSON implementation in Ruby
190
172
  test_files:
191
- - tests/test_json_unicode.rb
192
- - tests/test_json.rb
193
173
  - tests/test_json_addition.rb
194
- - tests/test_json_generate.rb
195
174
  - tests/test_json_rails.rb
175
+ - tests/test_json.rb
176
+ - tests/test_json_generate.rb
177
+ - tests/test_json_unicode.rb
196
178
  - tests/test_json_fixtures.rb