~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/pl/plpython/expected/plpython_trigger.out

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-02-05 18:13:52 UTC
  • mfrom: (1.1.10) (10.1.5 oneiric-proposed)
  • Revision ID: package-import@ubuntu.com-20130205181352-3kw4f94ilqklzm7c
Tags: 9.1.8-0ubuntu11.10
* New upstream security/bug fix release: (LP: #1116336)
  - Prevent execution of enum_recv from SQL
    The function was misdeclared, allowing a simple SQL command to crash the
    server.  In principle an attacker might be able to use it to examine the
    contents of server memory.  Our thanks to Sumit Soni (via Secunia SVCRP)
    for reporting this issue. (CVE-2013-0255)
  - See HISTORY/changelog.gz for the other bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
604
604
 ("(,t)","(1,f)",)
605
605
(3 rows)
606
606
 
 
607
-- check that using a function as a trigger over two tables works correctly
 
608
CREATE FUNCTION trig1234() RETURNS trigger LANGUAGE plpythonu AS $$
 
609
    TD["new"]["data"] = '1234'
 
610
    return 'MODIFY'
 
611
$$;
 
612
CREATE TABLE a(data text);
 
613
CREATE TABLE b(data int); -- different type conversion
 
614
CREATE TRIGGER a_t BEFORE INSERT ON a FOR EACH ROW EXECUTE PROCEDURE trig1234();
 
615
CREATE TRIGGER b_t BEFORE INSERT ON b FOR EACH ROW EXECUTE PROCEDURE trig1234();
 
616
INSERT INTO a DEFAULT VALUES;
 
617
SELECT * FROM a;
 
618
 data 
 
619
------
 
620
 1234
 
621
(1 row)
 
622
 
 
623
DROP TABLE a;
 
624
INSERT INTO b DEFAULT VALUES;
 
625
SELECT * FROM b;
 
626
 data 
 
627
------
 
628
 1234
 
629
(1 row)
 
630