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 +8 -0
- data/Rakefile +4 -2
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +1 -1
- data/lib/json/pure/parser.rb +3 -1
- data/lib/json/version.rb +1 -1
- metadata +109 -127
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.
|
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
|
499
|
+
static VALUE cState_configure(VALUE self, VALUE opts)
|
500
500
|
{
|
501
501
|
VALUE tmp;
|
502
502
|
GET_STATE(self);
|
data/lib/json/pure/parser.rb
CHANGED
@@ -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
|
-
|
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
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.
|
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-
|
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
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
-
|
46
|
-
-
|
47
|
-
-
|
48
|
-
-
|
49
|
-
-
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
-
|
59
|
-
-
|
60
|
-
-
|
61
|
-
-
|
62
|
-
-
|
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/
|
77
|
-
- ext/json/ext/
|
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.
|
73
|
+
- ext/json/ext/parser/parser.rl
|
81
74
|
- ext/json/ext/parser/unicode.c
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
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
|
-
-
|
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/
|
103
|
-
- lib/json/
|
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/
|
108
|
-
- lib/json/
|
96
|
+
- lib/json/version.rb
|
97
|
+
- lib/json/ext.rb
|
109
98
|
- lib/json/editor.rb
|
110
|
-
- lib/json/
|
111
|
-
- TODO
|
112
|
-
- data
|
113
|
-
- data/prototype.js
|
114
|
-
- data/index.html
|
99
|
+
- lib/json/NilClass.xpm
|
115
100
|
- data/example.json
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
126
|
-
-
|
127
|
-
-
|
128
|
-
-
|
129
|
-
-
|
130
|
-
-
|
131
|
-
-
|
132
|
-
-
|
133
|
-
-
|
134
|
-
-
|
135
|
-
-
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
-
|
140
|
-
-
|
141
|
-
-
|
142
|
-
-
|
143
|
-
-
|
144
|
-
-
|
145
|
-
-
|
146
|
-
-
|
147
|
-
-
|
148
|
-
-
|
149
|
-
-
|
150
|
-
-
|
151
|
-
-
|
152
|
-
-
|
153
|
-
-
|
154
|
-
-
|
155
|
-
-
|
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.
|
171
|
+
rubygems_version: 1.3.2
|
190
172
|
signing_key:
|
191
|
-
specification_version:
|
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
|