Another fix against bug with privileges containing escaped wilcards in database names

This commit is contained in:
Loïc Chapeaux
2002-04-13 08:14:58 +00:00
parent cb97b5c43e
commit 89593673da
2 changed files with 4 additions and 3 deletions

View File

@@ -7,8 +7,9 @@ $Source$
2002-04-13 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-04-13 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/korean.inc.php3: fixed some inconcistencies. * lang/korean.inc.php3: fixed some inconcistencies.
* main.php3, lines 200-201: fixed a bug with privileges with escaped * main.php3, lines 200-201; user_details.php3, line 82: fixed a bug with
wilcards in database names. Thanks to privileges when applied to database name containing an escaped wilcard
character (then used a litteral charcter). Thanks to
Mike Eheler <meheler @ users.sourceforge.net>. Mike Eheler <meheler @ users.sourceforge.net>.
2002-04-12 Lo<4C>c Chapeaux <lolo@phpheaven.net> 2002-04-12 Lo<4C>c Chapeaux <lolo@phpheaven.net>

View File

@@ -79,7 +79,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) {
if ($grants_cnt) { if ($grants_cnt) {
$i = 0; $i = 0;
while ($usr_row = mysql_fetch_row($result)) { while ($usr_row = mysql_fetch_row($result)) {
if (eregi('GRANT (.*) ON ([^\.]+).([^\.]+) TO .*$', $usr_row[0], $parts)) { if (eregi('GRANT (.*) ON ([^.]+).([^.]+) TO .*$', $usr_row[0], $parts)) {
// loic1: bug #487673 - revoke 'reference' // loic1: bug #487673 - revoke 'reference'
if ($parts[1] == 'USAGE') { if ($parts[1] == 'USAGE') {
$priv = ''; $priv = '';