#26336 [Opn->Bgs]: mysql_list_dbs() returns all databases regardless of permissions
| From: | iliaa@php.net | Date: | Fri, 21 Nov 2003 00:24:12 +0000 |
| Subject: | #26336 [Opn->Bgs]: mysql_list_dbs() returns all databases regardless of permissions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-50770@lists.php.net to get a copy of this message | ||
ID: 26336
Updated by: iliaa@php.net
Reported By: r3n at r3n dot net
-Status: Open
+Status: Bogus
Bug Type: MySQL related
Operating System: Redhat Linux
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
First of all this is not a bug, the fact you see the databases does not
mean you can use them.
If it were a bug, which is it is not, then it would be a MySQL bug and
not a PHP one.
Previous Comments:
------------------------------------------------------------------------
[2003-11-20 19:18:24] r3n at r3n dot net
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 this bug report at http://bugs.php.net/?id=26336&edit=1