Hello community, here is the log from the commit of package perl-Cpanel-JSON-XS for openSUSE:Factory checked in at 2020-10-10 00:27:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS (Old) and /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Cpanel-JSON-XS" Sat Oct 10 00:27:57 2020 rev:29 rq:839564 version:4.24 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Cpanel-JSON-XS/perl-Cpanel-JSON-XS.changes 2020-09-07 21:36:18.077407034 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Cpanel-JSON-XS.new.4249/perl-Cpanel-JSON-XS.changes 2020-10-10 00:28:04.417115016 +0200 @@ -1,0 +2,9 @@ +Sun Oct 4 03:07:30 UTC 2020 - Tina Müller <timueller+p...@suse.de> + +- updated to 4.24 + see /usr/share/doc/packages/perl-Cpanel-JSON-XS/Changes + + 4.24 2020-10-02 (rurban) + - Fix decode_json(scalar, 0) (GH #171 plicease), check 2nd arg for true-ness + +------------------------------------------------------------------- Old: ---- Cpanel-JSON-XS-4.23.tar.gz New: ---- Cpanel-JSON-XS-4.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Cpanel-JSON-XS.spec ++++++ --- /var/tmp/diff_new_pack.CdmpBG/_old 2020-10-10 00:28:04.981115295 +0200 +++ /var/tmp/diff_new_pack.CdmpBG/_new 2020-10-10 00:28:04.981115295 +0200 @@ -17,7 +17,7 @@ Name: perl-Cpanel-JSON-XS -Version: 4.23 +Version: 4.24 Release: 0 %define cpan_name Cpanel-JSON-XS Summary: CPanel fork of JSON::XS, fast and correct serializing ++++++ Cpanel-JSON-XS-4.23.tar.gz -> Cpanel-JSON-XS-4.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/Changes new/Cpanel-JSON-XS-4.24/Changes --- old/Cpanel-JSON-XS-4.23/Changes 2020-09-05 12:19:48.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/Changes 2020-10-02 11:04:11.000000000 +0200 @@ -2,6 +2,9 @@ TODO: http://stevehanov.ca/blog/index.php?id=104 compression +4.24 2020-10-02 (rurban) + - Fix decode_json(scalar, 0) (GH #171 plicease), check 2nd arg for true-ness + 4.23 2020-09-05 (rurban) - Fixup t/54_stringify change for JSON 2.09 (really use PR #169 madsen) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/META.json new/Cpanel-JSON-XS-4.24/META.json --- old/Cpanel-JSON-XS-4.23/META.json 2020-09-05 12:21:13.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/META.json 2020-10-02 11:04:51.000000000 +0200 @@ -100,7 +100,7 @@ "url" : "https://github.com/rurban/Cpanel-JSON-XS" } }, - "version" : "4.23", + "version" : "4.24", "x_contributors" : [ "Ashley Willis <ashl...@cpan.org>", "Chip Salzenberg <c...@pobox.com>", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/META.yml new/Cpanel-JSON-XS-4.24/META.yml --- old/Cpanel-JSON-XS-4.23/META.yml 2020-09-05 12:21:13.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/META.yml 2020-10-02 11:04:51.000000000 +0200 @@ -48,7 +48,7 @@ bugtracker: https://github.com/rurban/Cpanel-JSON-XS/issues license: http://dev.perl.org/licenses/ repository: https://github.com/rurban/Cpanel-JSON-XS -version: '4.23' +version: '4.24' x_contributors: - 'Ashley Willis <ashl...@cpan.org>' - 'Chip Salzenberg <c...@pobox.com>' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/README new/Cpanel-JSON-XS-4.24/README --- old/Cpanel-JSON-XS-4.23/README 2020-09-05 12:21:15.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/README 2020-10-02 11:04:53.000000000 +0200 @@ -219,12 +219,14 @@ 3.0116 and JSON::XS did not set allow_nonref but allowed them due to a bug in the decoder. - If the new optional $allow_nonref argument is set and not false, the - allow_nonref option will be set and the function will act is + If the new 2nd optional $allow_nonref argument is set and not false, + the "allow_nonref" option will be set and the function will act is described as in the relaxed RFC 7159 allowing all values such as - objects, arrays, strings, numbers, "null", "true", and "false". + objects, arrays, strings, numbers, "null", "true", and "false". See + ""OLD" VS. "NEW" JSON (RFC 4627 VS. RFC 7159)" below, why you don't + want to do that. - For the type argument see Cpanel::JSON::XS::Type. + For the 3rd optional type argument see Cpanel::JSON::XS::Type. $is_boolean = Cpanel::JSON::XS::is_bool $scalar Returns true if the passed scalar represents either "JSON::PP::true" @@ -941,7 +943,7 @@ value has been chosen to be as large as typical operating systems allow without crashing. - See SECURITY CONSIDERATIONS, below, for more info on why this is + See "SECURITY CONSIDERATIONS", below, for more info on why this is useful. $json = $json->max_size ([$maximum_string_size]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/SIGNATURE new/Cpanel-JSON-XS-4.24/SIGNATURE --- old/Cpanel-JSON-XS-4.23/SIGNATURE 2020-09-05 12:21:15.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/SIGNATURE 2020-10-02 11:04:53.000000000 +0200 @@ -19,14 +19,14 @@ SHA256 a3c34aba52e269e6cec558ecf9cff393138574189fdff26b183bee9cc2e0434f .travis.yml SHA256 c3f2a1a4f66382f796f71a571946722edba53cf3238152b26fd325f4c2f1a20f .whitesource SHA256 8de3540a3cd7ecc9a9dcb48975fe852c082fe17d4462f87bb72aa7cc47f083ad COPYING -SHA256 4e5057348248bac6c0a4f29eab92e2ce63c228dc229ef0c35c8550a534e6a1f1 Changes +SHA256 0615a751bdb3a0875b26604e942b4f2a24209fb6820059d38921ba60c7da2fb8 Changes SHA256 9a862bfa951e3d5b43c2dcb95767dbf15ed2ee3af872442d3815795757533f29 MANIFEST -SHA256 593685588fe224f1df2ce1062825982d9786d97eed92ca447641a25836f0d39c META.json -SHA256 e9434dc9669e91865afbf312657920c3a240b79b31ee020d72d8f607d1192154 META.yml +SHA256 05005192b34694b6ad27af08de1c69ca9489071f27592a133d4e4f2180fbe570 META.json +SHA256 50797299bf9d8a81f5657cb44e30872cc8e0aa8bd737b770a8355a12c94197db META.yml SHA256 f8861d5bea7bea9bac7300674a110b607c82db7bb1e7ae789ceb6a6ab706b5bc Makefile.PL -SHA256 74fe9f05007d22e78f8dae1e9ef9fc62a7be2c971e48109969e2a22951d981cc README -SHA256 952aea9cc4f36abdc72d63c5102cafcea12b2a9e6c89e771452036a5ca24beae XS.pm -SHA256 e31b12aee05f540c9e0f10f7cacfd51d9972328b8c72b6d2b9b4a4fd8bcaf895 XS.xs +SHA256 8f148ef8274dedead04152016f433003da991dbdfb1b12dac84674b4845e2d8e README +SHA256 4bc803bdb3163e46777aaee57e58be23ff86d4b1eac256b693cbd6bc6a89c6b1 XS.pm +SHA256 3f9d85c820e913ec997eeefc94b78fa6d337e030c7b0246381a1484eec04465d XS.xs SHA256 c95e4b970183cbd6d1ec9c88c37a80f12bd2b66ed6be3c008ffd578d2f622c01 XS/Boolean.pm SHA256 20596259e7e399ed1984a469a9a907be878499406d5285a11f1ab98f93aff44f XS/Type.pm SHA256 2f34a530b7ce981b0df9aacd2b6944ccf74c4a7f8bb49fde57b342663e7feb26 bin/cpanel_json_xs @@ -47,7 +47,7 @@ SHA256 e8bf435b08bfd00e6ab7f278c6ce68ef8691011b80615fa372961f2d807f5c76 t/105_esc_slash.t SHA256 11a3b561ac5904abc84fee0003b9fb40425c29ae8eea7a69bc945e5b565af116 t/106_allow_barekey.t SHA256 e267f630d9dd7001eb03a620d34782cd15f74548869971a37980293b137824f9 t/107_allow_singlequote.t -SHA256 0eb36b085e7a64ee8100f75b7d85f8cb4f1fa918ab02d41dcd15713b2958eb1c t/108_decode.t +SHA256 f2047975a3b8392feb6a87d782ecc7746ae2117bde57f716cc90877c8850f2e0 t/108_decode.t SHA256 e6f7738431bc8d77ad0b8ad2db9ab54426f7bbc86eb5f5794b1a4616f454baef t/109_encode.t SHA256 d6c467d647ab46c64734d6c6913ff262e854e00073a804da186caf894c5367d0 t/10_pc_keysort.t SHA256 256e0dcaae188387bc0db211dd3b713576d73c01d95c5429417ed9c622640b4d t/110_bignum.t @@ -445,12 +445,12 @@ SHA256 aca6f846869ab2e4881e807739086e1535b1438bd0e23d7a021360742736a6a9 xt/pod.t -----BEGIN PGP SIGNATURE----- -iQEzBAEBAwAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAl9TZpoACgkQtPYzOeZd -ZBRoJQf/cSx2QCIINaCO6Kccov4/lMmuHrlThI/q9DgRVOin+0YEMWtZMC3+Gsom -HLNiAe46dqGYeWfiBgoAnVw8or5FfEo8L9grbWAPPMUPIhBkSbu6tLStZ1bMEAy6 -8Ot3d25mtBsCateiUSH8KIs8yTniDXyhGCQV4SsKZNlWZNRlZB+/pFlRS0qreKqT -pFAlxi8hLh/hZA9bpA044OtBoeltx6F2b8j/Q/2ooGkv+mK1Ao9vsnG5bFqH++71 -j/wTirTdhWJOtxMfeTxeMpkQ27xTzy5rnNovyIsn97cVltfrI7oQyVn42qaN2VHL -8FPPW+TmM8uQrWLlg/V9buWau9eqIA== -=k5+d +iQEzBAEBAwAdFiEEKJWogdNCcPq/6PdHtPYzOeZdZBQFAl927TQACgkQtPYzOeZd +ZBTiewf8Dxo5JeRRuB8AAR6yVIEk7Y9YvRHzGbRMrBD0JhFSnABxwLLBgo0ZJLYC +ktrA3gMqSTzmsah01H/j2ZnzZD/oAQar77JQFBF5Fci51Hhy7MLalKF5XpSphqFQ +mkggKlK/bOYjFOlwvc1hzjly/3fU3u8VpKRzjmO6kp7huQB9O8RmG3VJ2BwCQoVT +YHf4UJ7V+MyipumwtuM/4RTdOpiPqDba0bf+dNw4ZBj17mdkB3YyZnEcF1seEcIl +MsCL2ksjbe8B/6ybdVP4spCtvlYozubt8lszPMNIa/v3sZ/kTwVRJQqg0nvQ6rCL +/CkM+JU9fsAaZIakSeBSBNJAvN+GTw== +=nU3V -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/XS.pm new/Cpanel-JSON-XS-4.24/XS.pm --- old/Cpanel-JSON-XS-4.23/XS.pm 2020-09-05 12:19:48.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/XS.pm 2020-10-02 11:04:11.000000000 +0200 @@ -1,5 +1,5 @@ package Cpanel::JSON::XS; -our $VERSION = '4.23'; +our $VERSION = '4.24'; our $XS_VERSION = $VERSION; # $VERSION = eval $VERSION; @@ -267,12 +267,14 @@ 3.0116 and JSON::XS did not set allow_nonref but allowed them due to a bug in the decoder. -If the new optional $allow_nonref argument is set and not false, the -allow_nonref option will be set and the function will act is described +If the new 2nd optional $allow_nonref argument is set and not false, the +C<allow_nonref> option will be set and the function will act is described as in the relaxed RFC 7159 allowing all values such as objects, arrays, strings, numbers, "null", "true", and "false". +See L</"OLD" VS. "NEW" JSON (RFC 4627 VS. RFC 7159)> below, why you don't +want to do that. -For the type argument see L<Cpanel::JSON::XS::Type>. +For the 3rd optional type argument see L<Cpanel::JSON::XS::Type>. =item $is_boolean = Cpanel::JSON::XS::is_bool $scalar @@ -1071,7 +1073,7 @@ been chosen to be as large as typical operating systems allow without crashing. -See SECURITY CONSIDERATIONS, below, for more info on why this is useful. +See L</SECURITY CONSIDERATIONS>, below, for more info on why this is useful. =item $json = $json->max_size ([$maximum_string_size]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/XS.xs new/Cpanel-JSON-XS-4.24/XS.xs --- old/Cpanel-JSON-XS-4.23/XS.xs 2020-08-13 12:49:05.000000000 +0200 +++ new/Cpanel-JSON-XS-4.24/XS.xs 2020-10-02 11:04:11.000000000 +0200 @@ -516,6 +516,17 @@ /* Since perl 5.14 we can disallow illegal unicode above U+10FFFF. Before we could only warn with warnings 'utf8'. We accept only valid unicode, unless we are in the relaxed mode. */ +/* + perl 5.32 deprecated utf8n_to_uvuni accepting illegal unicode, so relaxed does not + allow such illegal unicode anymore, rather throws a warning in the 'utf8' category. + Still looking for a way to get the old correct behavior. */ +/* +#if PERL_VERSION > 31 + UV c = utf8_to_uvchr_buf (s, &s[len+1], clen); + / * UV c = valid_utf8_to_uvchr (s, clen); * / + PERL_UNUSED_ARG(relaxed); +#elif PERL_VERSION > 12 +*/ #if PERL_VERSION > 12 UV c = utf8n_to_uvuni (s, len, clen, UTF8_CHECK_ONLY | (relaxed ? 0 : UTF8_DISALLOW_SUPER)); @@ -4958,10 +4969,10 @@ PROTOTYPES: ENABLE void encode_json (SV *scalar, SV *typesv = &PL_sv_undef) - ALIAS: + ALIAS: _to_json = 0 encode_json = F_UTF8 - PPCODE: + PPCODE: { JSON json; json_init (&json); @@ -4971,15 +4982,15 @@ } void decode_json (SV *jsonstr, SV *allow_nonref = NULL, SV *typesv = NULL) - ALIAS: + ALIAS: _from_json = 0 decode_json = F_UTF8 - PPCODE: + PPCODE: { JSON json; json_init (&json); json.flags |= ix; - if (ix && allow_nonref) + if (ix && SvTRUE (allow_nonref)) json.flags |= F_ALLOW_NONREF; PUTBACK; jsonstr = decode_json (aTHX_ jsonstr, &json, 0, typesv); SPAGAIN; XPUSHs (jsonstr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Cpanel-JSON-XS-4.23/t/108_decode.t new/Cpanel-JSON-XS-4.24/t/108_decode.t --- old/Cpanel-JSON-XS-4.23/t/108_decode.t 2015-12-02 17:24:12.000000000 +0100 +++ new/Cpanel-JSON-XS-4.24/t/108_decode.t 2020-10-02 11:04:11.000000000 +0200 @@ -2,7 +2,7 @@ # decode on Perl 5.005, 5.6, 5.8 or later # use strict; -use Test::More tests => 8; +use Test::More tests => 11; use Cpanel::JSON::XS; use lib qw(t); @@ -47,3 +47,8 @@ close $fh; }; +$decode = eval { decode_json("true", 0) }; +like($@, qr/^JSON text must be an object or array/, 'treat decode_json 0 as not allow_nonref'); +$decode = eval { decode_json("true", 1) }; +ok(!$@, "treat decode_json 1 as allow_nonref"); +is($decode, 1, "decode true as 1");