Doc #62978 [NEW]: pg_select() doc example has severe security issues

From: Date: Thu, 30 Aug 2012 22:58:03 +0000
Subject: Doc #62978 [NEW]: pg_select() doc example has severe security issues
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-8793@lists.php.net to get a copy of this message
From: slokunshialgo at gmail dot com Operating system: PHP version: 5.4.6 Package: Documentation problem Bug Type: Documentation Problem Bug description:pg_select() doc example has severe security issues Description: ------------ --- From manual page: http://www.php.net/function.pg-select#refsect1-function.pg-select-examples --- The one example given passes $_POST directly to pg_select as a list of parameters to select on. There are 2 major issues with this: 1) It doesn't show the actual parameters being passed, making the example difficult to understand 2) Using end-user-supplied values like this is a perfect vector for SQL injection, and as such as a huge security risk. While #1 is a concern, #2 is a larger one, since newer programmers seeing it will think that's good practice, and start putting such security issues into their own code. -- Edit bug report at https://bugs.php.net/bug.php?id=62978&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62978&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62978&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62978&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=62978&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62978&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=62978&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=62978&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=62978&r=needscript Try newer version: https://bugs.php.net/fix.php?id=62978&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=62978&r=support Expected behavior: https://bugs.php.net/fix.php?id=62978&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=62978&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=62978&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=62978&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62978&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=62978&r=dst IIS Stability: https://bugs.php.net/fix.php?id=62978&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=62978&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=62978&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=62978&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=62978&r=mysqlcfg

« previous php.doc.bugs (#8793) next »