~ubuntu-branches/ubuntu/utopic/postgresql-9.4/utopic-security

« back to all changes in this revision

Viewing changes to src/test/regress/sql/json.sql

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, CVE-2014-8161
  • Date: 2015-02-06 12:31:46 UTC
  • mfrom: (1.1.5) (7.1.2 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20150206123146-vtmf30jbkm7w16p8
Tags: 9.4.1-0ubuntu0.14.10
* New upstream security/bug fix release (LP: #1418928)
  - Fix buffer overruns in to_char() [CVE-2015-0241]
  - Fix buffer overruns in contrib/pgcrypto [CVE-2015-0243]
  - Fix possible loss of frontend/backend protocol synchronization after an
    error [CVE-2015-0244]
  - Fix information leak via constraint-violation error messages
    [CVE-2014-8161]
  - See release notes for details about other fixes:
    http://www.postgresql.org/about/news/1569/

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
select to_json(timestamptz '2014-05-28 12:22:35.614298-04');
112
112
COMMIT;
113
113
 
114
 
 
115
 
select to_json(text '\uabcd');
116
 
 
117
 
 
118
 
select to_json(text '\abcd');
119
 
 
120
114
--json_agg
121
115
 
122
116
SELECT json_agg(q)
401
393
 
402
394
--handling of simple unicode escapes
403
395
 
 
396
select json '{ "a":  "the Copyright \u00a9 sign" }' as correct_in_utf8;
 
397
select json '{ "a":  "dollar \u0024 character" }' as correct_everywhere;
 
398
select json '{ "a":  "dollar \\u0024 character" }' as not_an_escape;
 
399
select json '{ "a":  "null \u0000 escape" }' as not_unescaped;
 
400
select json '{ "a":  "null \\u0000 escape" }' as not_an_escape;
 
401
 
404
402
select json '{ "a":  "the Copyright \u00a9 sign" }' ->> 'a' as correct_in_utf8;
405
403
select json '{ "a":  "dollar \u0024 character" }' ->> 'a' as correct_everywhere;
406
 
select json '{ "a":  "null \u0000 escape" }' ->> 'a' as not_unescaped;
 
404
select json '{ "a":  "dollar \\u0024 character" }' ->> 'a' as not_an_escape;
 
405
select json '{ "a":  "null \u0000 escape" }' ->> 'a' as fails;
 
406
select json '{ "a":  "null \\u0000 escape" }' ->> 'a' as not_an_escape;
407
407
 
408
408
--json_typeof() function
409
409
select value, json_typeof(value)