aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPUserManager.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-27 09:16:49 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-27 09:16:49 +0000
commit5af57456d3669d048c16831bd3a5afdb7ca9b2e2 (patch)
treecac500cd7bc00bc1c81fe0a444cd6f36dbb014d3 /Source/SPUserManager.m
parent1d7de2c00dae782992e1c082fbf3e98fe3666b88 (diff)
downloadsequelpro-5af57456d3669d048c16831bd3a5afdb7ca9b2e2.tar.gz
sequelpro-5af57456d3669d048c16831bd3a5afdb7ca9b2e2.tar.bz2
sequelpro-5af57456d3669d048c16831bd3a5afdb7ca9b2e2.zip
Correctly quote database name when GRANT'ing and REVOK'ing privileges. Fixes issue #647.
Diffstat (limited to 'Source/SPUserManager.m')
-rw-r--r--Source/SPUserManager.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index cad74193..26986d0b 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -1025,7 +1025,7 @@
{
NSString *grantStatement = [NSString stringWithFormat:@"GRANT %@ ON %@.* TO %@@%@",
[[grantPrivileges componentsJoinedByCommas] uppercaseString],
- dbName,
+ [dbName backtickQuotedString],
[[schemaPriv valueForKeyPath:@"user.parent.user"] tickQuotedString],
[[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString]];
DLog(@"%@", grantStatement);
@@ -1038,7 +1038,7 @@
{
NSString *revokeStatement = [NSString stringWithFormat:@"REVOKE %@ ON %@.* FROM %@@%@",
[[revokePrivileges componentsJoinedByCommas] uppercaseString],
- dbName,
+ [dbName backtickQuotedString],
[[schemaPriv valueForKeyPath:@"user.parent.user"] tickQuotedString],
[[schemaPriv valueForKeyPath:@"user.host"] tickQuotedString]];
DLog(@"%@", revokeStatement);