Skip to content

Commit

Permalink
Merge pull request #594 from skroll/escape_backslash
Browse files Browse the repository at this point in the history
Fix escaped backslashes in grants
  • Loading branch information
igalic committed Nov 7, 2014
2 parents 1494412 + 9dbdd89 commit 8dd37ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/puppet/provider/mysql_grant/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def self.instances
# Matching: GRANT (SELECT, UPDATE) PRIVILEGES ON (*.*) TO ('root')@('127.0.0.1') (WITH GRANT OPTION)
if match = munged_grant.match(/^GRANT\s(.+)\sON\s(.+)\sTO\s(.*)@(.*?)(\s.*)?$/)
privileges, table, user, host, rest = match.captures
table.gsub!('\\\\', '\\')

# split on ',' if it is not a non-'('-containing string followed by a
# closing parenthesis ')'-char - e.g. only split comma separated elements not in
# parentheses
Expand Down

0 comments on commit 8dd37ae

Please sign in to comment.