From 17e4626dff23bbdaffae081e59ca2010618900d6 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 14 Dec 2007 16:32:43 -0600 Subject: [PATCH] web installer: improve DB permissions check MySQL-only: improve regex to make sure we are checking permission on the correct database, not on another database (when the DB name is a subset of the DB user's name) --- installer/install.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer/install.pl b/installer/install.pl index 3cb698c983..98762545c9 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -188,7 +188,7 @@ elsif ( $step && $step == 2 ) { my $grantaccess; while ( my ($line) = $rq->fetchrow ) { my $dbname = $info{dbname}; - if ( $line =~ m/$dbname/ || index( $line, '*.*' ) > 0 ) { + if ( $line =~ m/^GRANT (.*?) ON `$dbname`\.\*/ || index( $line, '*.*' ) > 0 ) { $grantaccess = 1 if ( index( $line, 'ALL PRIVILEGES' ) > 0 -- 2.20.1