json 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of json might be problematic. Click here for more details.

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 = /(-?
@@ -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
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 as a Ruby extension in C.
17
17
  email: flori@ping.de
18
18
  executables:
19
19
  - edit_json.rb
@@ -24,142 +24,124 @@ extensions:
24
24
  extra_rdoc_files: []
25
25
 
26
26
  files:
27
+ - RUBY
28
+ - CHANGES
29
+ - bin/edit_json.rb
30
+ - bin/prettify_json.rb
31
+ - VERSION
27
32
  - GPL
28
- - tests
29
- - tests/test_json_unicode.rb
30
- - tests/test_json.rb
31
- - tests/test_json_addition.rb
32
- - tests/fixtures
33
- - tests/fixtures/fail1.json
34
- - tests/fixtures/fail18.json
35
- - tests/fixtures/fail13.json
36
- - tests/fixtures/fail3.json
37
- - tests/fixtures/fail10.json
38
- - tests/fixtures/fail6.json
39
- - tests/fixtures/fail20.json
40
- - tests/fixtures/pass1.json
41
- - tests/fixtures/fail28.json
42
- - tests/fixtures/fail21.json
43
- - tests/fixtures/pass26.json
44
- - tests/fixtures/fail22.json
45
- - tests/fixtures/pass15.json
46
- - tests/fixtures/fail11.json
47
- - tests/fixtures/fail19.json
48
- - tests/fixtures/fail2.json
49
- - tests/fixtures/fail8.json
50
- - tests/fixtures/pass16.json
51
- - tests/fixtures/fail24.json
52
- - tests/fixtures/fail23.json
53
- - tests/fixtures/pass3.json
54
- - tests/fixtures/fail7.json
55
- - tests/fixtures/pass2.json
56
- - tests/fixtures/pass17.json
57
- - tests/fixtures/fail14.json
58
- - tests/fixtures/fail9.json
59
- - tests/fixtures/fail12.json
60
- - tests/fixtures/fail27.json
61
- - tests/fixtures/fail4.json
62
- - tests/fixtures/fail5.json
63
- - tests/fixtures/fail25.json
64
- - tests/test_json_generate.rb
65
- - tests/test_json_rails.rb
66
- - tests/test_json_fixtures.rb
67
- - install.rb
68
- - ext
69
- - ext/json
70
- - ext/json/ext
71
- - ext/json/ext/generator
72
- - ext/json/ext/generator/unicode.h
33
+ - TODO
34
+ - README
35
+ - benchmarks/parser_benchmark.rb
36
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
37
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
38
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
39
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
40
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
41
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
42
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
43
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
44
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
45
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
46
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
47
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
48
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
49
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
50
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
51
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
52
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
53
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
54
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
55
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
56
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
57
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
58
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
59
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
60
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
61
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
62
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
63
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
64
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
65
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
66
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
67
+ - benchmarks/generator_benchmark.rb
73
68
  - ext/json/ext/generator/extconf.rb
74
- - ext/json/ext/generator/generator.c
75
69
  - ext/json/ext/generator/unicode.c
76
- - ext/json/ext/parser
77
- - ext/json/ext/parser/unicode.h
78
- - ext/json/ext/parser/parser.rl
70
+ - ext/json/ext/generator/generator.c
71
+ - ext/json/ext/generator/unicode.h
79
72
  - ext/json/ext/parser/extconf.rb
80
- - ext/json/ext/parser/parser.c
73
+ - ext/json/ext/parser/parser.rl
81
74
  - ext/json/ext/parser/unicode.c
82
- - VERSION
83
- - README
84
- - tools
85
- - tools/server.rb
75
+ - ext/json/ext/parser/parser.c
76
+ - ext/json/ext/parser/unicode.h
77
+ - Rakefile
86
78
  - tools/fuzz.rb
87
- - lib
79
+ - tools/server.rb
80
+ - doc-templates/main.txt
88
81
  - lib/json.rb
89
- - lib/json
90
- - lib/json/add
91
- - lib/json/add/core.rb
92
- - lib/json/add/rails.rb
93
- - lib/json/ext.rb
82
+ - lib/json/json.xpm
94
83
  - lib/json/Key.xpm
95
- - lib/json/Array.xpm
96
- - lib/json/common.rb
97
- - lib/json/ext
98
- - lib/json/Hash.xpm
99
84
  - lib/json/String.xpm
100
- - lib/json/FalseClass.xpm
101
85
  - lib/json/Numeric.xpm
102
- - lib/json/version.rb
103
- - lib/json/pure
86
+ - lib/json/Hash.xpm
87
+ - lib/json/add/rails.rb
88
+ - lib/json/add/core.rb
89
+ - lib/json/common.rb
90
+ - lib/json/Array.xpm
91
+ - lib/json/FalseClass.xpm
104
92
  - lib/json/pure/generator.rb
105
93
  - lib/json/pure/parser.rb
94
+ - lib/json/TrueClass.xpm
106
95
  - lib/json/pure.rb
107
- - lib/json/NilClass.xpm
108
- - lib/json/json.xpm
96
+ - lib/json/version.rb
97
+ - lib/json/ext.rb
109
98
  - lib/json/editor.rb
110
- - lib/json/TrueClass.xpm
111
- - TODO
112
- - data
113
- - data/prototype.js
114
- - data/index.html
99
+ - lib/json/NilClass.xpm
115
100
  - data/example.json
116
- - bin
117
- - bin/prettify_json.rb
118
- - bin/edit_json.rb
119
- - diagrams
120
- - doc-templates
121
- - doc-templates/main.txt
122
- - RUBY
123
- - benchmarks
124
- - benchmarks/data-p4-3GHz-ruby18
125
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
126
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
127
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
128
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
129
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
130
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
131
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
132
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
133
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
134
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
135
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
136
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
137
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
138
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
139
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
140
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
141
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
142
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
143
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
144
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
145
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
146
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
147
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
148
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
149
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
150
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
151
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
152
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
153
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
154
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
155
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
156
- - benchmarks/data
157
- - benchmarks/parser_benchmark.rb
158
- - benchmarks/generator_benchmark.rb
159
- - Rakefile
160
- - CHANGES
101
+ - data/index.html
102
+ - data/prototype.js
103
+ - tests/test_json_addition.rb
104
+ - tests/fixtures/pass16.json
105
+ - tests/fixtures/fail4.json
106
+ - tests/fixtures/fail1.json
107
+ - tests/fixtures/fail28.json
108
+ - tests/fixtures/fail8.json
109
+ - tests/fixtures/fail19.json
110
+ - tests/fixtures/pass2.json
111
+ - tests/fixtures/pass26.json
112
+ - tests/fixtures/pass1.json
113
+ - tests/fixtures/fail3.json
114
+ - tests/fixtures/fail20.json
115
+ - tests/fixtures/pass3.json
116
+ - tests/fixtures/pass15.json
117
+ - tests/fixtures/fail12.json
118
+ - tests/fixtures/fail13.json
119
+ - tests/fixtures/fail22.json
120
+ - tests/fixtures/fail24.json
121
+ - tests/fixtures/fail9.json
122
+ - tests/fixtures/fail2.json
123
+ - tests/fixtures/fail14.json
124
+ - tests/fixtures/fail6.json
125
+ - tests/fixtures/fail21.json
126
+ - tests/fixtures/fail7.json
127
+ - tests/fixtures/pass17.json
128
+ - tests/fixtures/fail11.json
129
+ - tests/fixtures/fail25.json
130
+ - tests/fixtures/fail5.json
131
+ - tests/fixtures/fail18.json
132
+ - tests/fixtures/fail27.json
133
+ - tests/fixtures/fail10.json
134
+ - tests/fixtures/fail23.json
135
+ - tests/test_json_rails.rb
136
+ - tests/test_json.rb
137
+ - tests/test_json_generate.rb
138
+ - tests/test_json_unicode.rb
139
+ - tests/test_json_fixtures.rb
140
+ - install.rb
161
141
  has_rdoc: true
162
142
  homepage: http://json.rubyforge.org
143
+ licenses: []
144
+
163
145
  post_install_message:
164
146
  rdoc_options:
165
147
  - --title
@@ -186,14 +168,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
168
  requirements: []
187
169
 
188
170
  rubyforge_project: json
189
- rubygems_version: 1.3.1
171
+ rubygems_version: 1.3.2
190
172
  signing_key:
191
- specification_version: 2
173
+ specification_version: 3
192
174
  summary: A JSON implementation as a Ruby extension
193
175
  test_files:
194
- - tests/test_json_unicode.rb
195
- - tests/test_json.rb
196
176
  - tests/test_json_addition.rb
197
- - tests/test_json_generate.rb
198
177
  - tests/test_json_rails.rb
178
+ - tests/test_json.rb
179
+ - tests/test_json_generate.rb
180
+ - tests/test_json_unicode.rb
199
181
  - tests/test_json_fixtures.rb