Home » Authentication » Auth » Bug #9696
Auth since 1.3.1: DB Container option "table" is to much restricted
Details
| Submitted | 2006-12-26 14:40 UTC |
|---|---|
| From | adwin at climbing dot nl |
| Assigned | aashley |
| Status | Closed |
| Package | Auth |
| PHP Version | 5_2 CVS-2006-12-26 |
| OS | All |
| Roadmaps | (Not assigned) |
Comments
[2006-12-26 14:40 UTC] adwin at climbing dot nl
Description:
------------
Since Auth 1.3.1, The DB Container option "table" may not contain a database reference any more, e.g. "db_name.db_table" does not work anymore as "table" option, but just "db_table" does. In the past, I used as "dsn" option something like "phptype://username:password@hostspec", but now I have to use something like "phptype://username:password@hostspec/db_name", because the database reference may not be part of the "table" option any more. The problem is that the table name is being quoted since Auth 1.3.1, which doesn't work with MySQL if a database reference is part of the table name. E.g.
SELECT `username`, `encrypted` FROM `people.users` WHERE `username` = 'whatever';
does not work, while
SELECT `username`, `encrypted` FROM `users` WHERE `username` = 'whatever';
does work. Before Auth 1.3.1, the table name was not yet quoted, so both methods worked.
Test script:
---------------
Expected result:
----------------
Actual result:
--------------
[2006-12-27 00:14 UTC] aashley at php dot net
Thank you for taking the time to report a problem with the package.
Unfortunately you are not using a current version of the package --
the problem might already be fixed. Please download a new
version from http://pear.php.net/packages.php
If you are able to reproduce the bug with one of the latest
versions, please change the package version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PEAR.
From version 1.4.0 add the 'auto_quote' => false option to the array of options passed to the DB container. This will get the old behaviour back.
For more info see the manual http://pear.php.net/manual/en/