From:             r3n at r3n dot net
Operating system: Redhat Linux
PHP version:      4.3.4
PHP Bug Type:     MySQL related
Bug description:  mysql_list_dbs() returns all databases regardless of permissions

Description:
------------
Regardless of the mysql user privelages, mysql_list_dbs() is returning
every single database on the server.

Reproduce code:
---------------
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$db_list = mysql_list_dbs($link);

while ($row = mysql_fetch_object($db_list)) {
    echo $row->Database . "\n";
}
?>


Expected result:
----------------
List of databases which the user has access to.

Actual result:
--------------
Every database on the server is being returned.

-- 
Edit bug report at http://bugs.php.net/?id=26336&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26336&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26336&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26336&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26336&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26336&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26336&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26336&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26336&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26336&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26336&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26336&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26336&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26336&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26336&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26336&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26336&r=float

Reply via email to