pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb
4+ messages / 1 participants
[nested] [flat]

* pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb
@ 2016-02-03 06:40  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2016-02-03 06:40 UTC (permalink / raw)
  To: pgsql-committers

Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.

Commit e09996ff8dee3f70 was one brick shy of a load: it didn't insist
that the detected JSON number be the whole of the supplied string.
This allowed inputs such as "2016-01-01" to be misdetected as valid JSON
numbers.  Per bug #13906 from Dmitry Ryabov.

In passing, be more wary of zero-length input (I'm not sure this can
happen given current callers, but better safe than sorry), and do some
minor cosmetic cleanup.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e6ecc93a1747624c4d33fa48d8a2d77319f3400f

Modified Files
--------------
contrib/hstore/expected/hstore.out | 16 ++++++------
contrib/hstore/sql/hstore.sql      |  4 +--
src/backend/utils/adt/json.c       | 52 ++++++++++++++++++++++++--------------
3 files changed, 43 insertions(+), 29 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb
@ 2016-02-03 06:40  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2016-02-03 06:40 UTC (permalink / raw)
  To: pgsql-committers

Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.

Commit e09996ff8dee3f70 was one brick shy of a load: it didn't insist
that the detected JSON number be the whole of the supplied string.
This allowed inputs such as "2016-01-01" to be misdetected as valid JSON
numbers.  Per bug #13906 from Dmitry Ryabov.

In passing, be more wary of zero-length input (I'm not sure this can
happen given current callers, but better safe than sorry), and do some
minor cosmetic cleanup.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1c291624b29dae2049ff1c7008563fbca85df658

Modified Files
--------------
contrib/hstore/expected/hstore.out | 16 ++++++------
contrib/hstore/sql/hstore.sql      |  4 +--
src/backend/utils/adt/json.c       | 52 ++++++++++++++++++++++++--------------
3 files changed, 43 insertions(+), 29 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb
@ 2016-02-03 06:40  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2016-02-03 06:40 UTC (permalink / raw)
  To: pgsql-committers

Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.

Commit e09996ff8dee3f70 was one brick shy of a load: it didn't insist
that the detected JSON number be the whole of the supplied string.
This allowed inputs such as "2016-01-01" to be misdetected as valid JSON
numbers.  Per bug #13906 from Dmitry Ryabov.

In passing, be more wary of zero-length input (I'm not sure this can
happen given current callers, but better safe than sorry), and do some
minor cosmetic cleanup.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/aa223a037be2935dd6e335d94550dc3f53262479

Modified Files
--------------
contrib/hstore/expected/hstore.out | 16 ++++++------
contrib/hstore/sql/hstore.sql      |  4 +--
src/backend/utils/adt/json.c       | 52 ++++++++++++++++++++++++--------------
3 files changed, 43 insertions(+), 29 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb
@ 2016-02-03 06:40  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2016-02-03 06:40 UTC (permalink / raw)
  To: pgsql-committers

Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage.

Commit e09996ff8dee3f70 was one brick shy of a load: it didn't insist
that the detected JSON number be the whole of the supplied string.
This allowed inputs such as "2016-01-01" to be misdetected as valid JSON
numbers.  Per bug #13906 from Dmitry Ryabov.

In passing, be more wary of zero-length input (I'm not sure this can
happen given current callers, but better safe than sorry), and do some
minor cosmetic cleanup.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/1f2b195ebf1c1646b20111f1c339fbaebb04da56

Modified Files
--------------
contrib/hstore/expected/hstore.out |  8 +++---
contrib/hstore/sql/hstore.sql      |  2 +-
src/backend/utils/adt/json.c       | 52 ++++++++++++++++++++++++--------------
3 files changed, 38 insertions(+), 24 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2016-02-03 06:40 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 06:40 pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb Tom Lane <tgl@sss.pgh.pa.us>
2016-02-03 06:40 pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb Tom Lane <tgl@sss.pgh.pa.us>
2016-02-03 06:40 pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb Tom Lane <tgl@sss.pgh.pa.us>
2016-02-03 06:40 pgsql: Fix IsValidJsonNumber() to notice trailing non-alphanumeric garb Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox