pg_insert_002.phpt 564 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. PostgreSQL pg_insert() - test for CVE-2015-1532
  3. --SKIPIF--
  4. <?php include("skipif.inc"); ?>
  5. --FILE--
  6. <?php
  7. include('config.inc');
  8. $conn = pg_connect($conn_str);
  9. foreach (array('', '.', '..') as $table) {
  10. var_dump(pg_insert($conn, $table, array('id' => 1, 'id2' => 1)));
  11. }
  12. ?>
  13. Done
  14. --EXPECTF--
  15. Warning: pg_insert(): The table name must be specified in %s on line %d
  16. bool(false)
  17. Warning: pg_insert(): The table name must be specified in %s on line %d
  18. bool(false)
  19. Warning: pg_insert(): The table name must be specified in %s on line %d
  20. bool(false)
  21. Done