Age | Commit message (Collapse) | Author |
|
https://github.com/flori/json/commit/202ffe2335
|
|
https://github.com/flori/json/commit/39d6c854a4
|
|
https://github.com/flori/json/commit/11b31210ac
|
|
https://github.com/flori/json/commit/41c2712a3b
|
|
https://github.com/flori/json/commit/936f280f9f
|
|
Fix: https://github.com/flori/json/issues/553
We can never add keyword arguments to `dump` otherwise
existing code using unenclosed hash will break.
https://github.com/flori/json/commit/8e0076a3f2
|
|
|
|
> https://github.com/flori/json/pull/525
> Rename escape_slash in script_safe and also escape E+2028 and E+2029
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
> https://github.com/flori/json/pull/454
> Remove unnecessary initialization of create_id in JSON.parse()
Co-authored-by: Watson <watson1978@gmail.com>
|
|
It is rather common to directly interpolate JSON string inside
<script> tags in HTML as to provide configuration or parameters to a
script.
However this may lead to XSS vulnerabilities, to prevent that 3
characters need to be escaped:
- `/` (forward slash)
- `U+2028` (LINE SEPARATOR)
- `U+2029` (PARAGRAPH SEPARATOR)
The forward slash need to be escaped to prevent closing the script
tag early, and the other two are valid JSON but invalid Javascript
and can be used to break JS parsing.
Given that the intent of escaping forward slash is the same than escaping
U+2028 and U+2029, I chos to rename and repurpose the existing `escape_slash`
option.
|
|
Previously in the JSON::Ext parser, when we encountered an "Infinity"
token (and weren't allowing NaN/Infinity) we would try to display the
"unexpected token" at the character before.
https://github.com/flori/json/commit/42ac170712
|
|
Require tests/lib/helper.rb to avoid:
NoMethodError: undefined method `assert_separately'
https://github.com/flori/json/commit/a81bcc0328
|
|
https://github.com/flori/json/commit/bab704eb49
|
|
https://github.com/flori/json/commit/3804f38bf4
|
|
https://github.com/flori/json/commit/6cbadf6b6e
|
|
|
|
https://github.com/flori/json/commit/573ef94bc5
|
|
```
[ 3463/25719] JSONGeneratorTest#test_string_ext_included_calls_super/home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/json/json_generator_test.rb:411: warning: method redefined; discarding old included
/home/chkbuild/chkbuild/tmp/build/20230905T063003Z/ruby/test/json/json_generator_test.rb:399: warning: previous definition of included was here
```
http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20230905T063003Z.log.html.gz
|
|
https://github.com/flori/json/commit/7f9c29038d
|
|
assert_in_out_err adds --disable=gems so we don't need to add
--disable-gems in the args list.
Notes:
Merged: https://github.com/ruby/ruby/pull/8303
|
|
to prevent them from conflicting with yarp/test_helper
|
|
https://github.com/flori/json/commit/3dd36c6077
|
|
https://github.com/flori/json/commit/7138bf32c7
|
|
The C extension defines an `included` hook for the
`JSON::Ext::Generator::GeneratorMethods::String` module but neglects to
call `super` in the hook. This can break the functionality of various
other code that rely on the fact that `included` on `Module` will always
be called.
https://github.com/flori/json/commit/cd8bbe56a3
|
|
https://github.com/flori/json/commit/82fe866da2
Notes:
Merged: https://github.com/ruby/ruby/pull/6200
|
|
When `HAVE_RB_ENC_INTERNED_STR` is enabled it is possible to
pass through a null pointer to `rb_enc_interned_str` resulting
in a segfault
Fixes #495
https://github.com/flori/json/commit/b59368a8c2
|
|
This snuck in while addding tests for the `create_additions`
feature. Caught by JRuby when we added the `limit` option to the
Date/DateTime parsing methods, which causes this to be rejected as
an unknown keyword.
https://github.com/flori/json/commit/b1007dff66
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3975
|
|
|
|
|
|
|
|
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201021T123003Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:227: warning: ambiguous first argument; put parentheses or a space even after `-' operator
/home/chkbuild/chkbuild/tmp/build/20201021T123003Z/ruby/test/json/json_parser_test.rb:228: warning: ambiguous first argument; put parentheses or a space even after `-' operator
```
|
|
|
|
implementations
|
|
If set to true all parsed objects will be
immediately frozen, and strings will be
deduplicated if the Ruby implementation
allows it.
|
|
|
|
http://rubyci.s3.amazonaws.com/debian10/ruby-master/log/20200930T033004Z.diff.html.gz
```
[n/n] JSONCommonInterfaceTest#test_load = <elapsed> s
[n/n] JSONCommonInterfaceTest#test_load_file = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file: #<Tempfile:<build-dir>/tmp/20200930-7601-ptnv6i (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file! = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file!: #<Tempfile:<build-dir>/tmp/20200930-7601-1la6m9 (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file_with_option = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option: #<Tempfile:<build-dir>/tmp/20200930-7601-blf9hz (closed)>
[n/n] JSONCommonInterfaceTest#test_load_file_with_option! = <elapsed> s
+Leaked tempfile: JSONCommonInterfaceTest#test_load_file_with_option!: #<Tempfile:<build-dir>/tmp/20200930-7601-b5gsdb (closed)>
```
|
|
|
|
to prevent:
```
test/json/json_common_interface_test.rb:182: warning: mismatched indentations at 'end' with 'def' at 169
```
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3581
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3581
|
|
an early return still caused ensure to execute,
setting JSON constant to `nil` for later tests!
Notes:
Merged: https://github.com/ruby/ruby/pull/3581
|
|
issue #386.
https://github.com/flori/json/commit/0be363c99b
Notes:
Merged: https://github.com/ruby/ruby/pull/3581
|
|
Squashed commit of the following:
commit 26d181059989279a79c433cedcd893b4f52e42ee
Author: Francois Chagnon <francois.chagnon@jadedpixel.com>
Date: Tue Sep 15 21:17:34 2015 +0000
add config options for escape_slash
commit fa282334051b16df91ca097dd7304b46f3bc7719
Author: Francois Chagnon <francois.chagnon@jadedpixel.com>
Date: Mon Feb 9 21:09:33 2015 +0000
add forward slash to escape character
Notes:
Merged: https://github.com/ruby/ruby/pull/3581
|
|
```
/home/mame/work/ruby/.ext/common/json/common.rb:263: warning: Float 23456789012E666 out of range
```
|
|
|
|
|
|
https://github.com/flori/json/commit/d5c6566b41
|
|
... because it conflicts with test/ruby/test_m17n.rb.
An exception `incompatible character encodings: UTF-8 and UTF-16BE`
occurs when:
* a non-existence relative path is added to $LOAD_PATH,
* ASCII-incompatible encoding is set to default_external, and
* some file is loaded.
```
$LOAD_PATH << "no_existing_dir"
Encoding.default_external = Encoding::UTF_16BE
load "dummy.rb" #=> incompatible character encodings: UTF-8 and UTF-16BE
```
This issue can be actually observed by a combination of out-of-place
build and the following command:
make test-all TESTS="json ruby/m17n -n test_object_inspect_external"
http://ci.rvm.jp/logfiles/brlog.trunk-test-random.20200322-221411
ASCII-incompatible default external encoding assumes that the cwd is the
encoding, and it is attempted to beconcatenated with a non-existence
relative LOAD_PATH UTF-8 string, which causes the exception.
This changeset avoids a relative path.
|
|
|