Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grant statements from AWS RDS are incorrectly parsed because of mandatory quoted password in regex #30

Open
arpheno opened this issue Apr 16, 2018 · 2 comments

Comments

@arpheno
Copy link

arpheno commented Apr 16, 2018

Hi,
This is a follow up to BUG#21653352 and its corresponding fix (commit). The fix is not complete, since line 690 still relies on single quotes and does not accept the masked ''<secret>" string (see original commit).

I'm encountering the issue when trying to use mysqluserclone:

mysqluserclone --source peter:dog@localhost:3308 peter@% peter2:cat@% --include-global-privileges --verbose --force

creates

ARNING: Using a password on the command line interface can be insecure.
# Source on localhost: ... connected.
# Cloning 1 users...
# Cloning peter@% to user peter2:cat@% 
CREATE USER 'peter3'@'%' IDENTIFIED BY 'secret'
Traceback (most recent call last):
  File "/home/swozny/prt/prt/venv/bin/mysqluserclone", line 199, in <module>
    new_user_list, options)
  File "/home/swozny/prt/prt/venv/local/lib/python2.7/site-packages/mysql/utilities/command/userclone.py", line 216, in clone_user
    user_source.clone(new_user, destination, global_privs)
  File "/home/swozny/prt/prt/venv/local/lib/python2.7/site-packages/mysql/utilities/common/user.py", line 690, in clone
    end = grant.index("'", start + len(search_str) + 2) + 2
ValueError: substring not found
arpheno pushed a commit to arpheno/mysql-utilities that referenced this issue Apr 16, 2018
@JDFagan
Copy link

JDFagan commented Nov 28, 2018

I ran into this exact same issue. I see you have a fix for it - any idea when it will be merged/released so I can make use of the fix?

@arpheno
Copy link
Author

arpheno commented Nov 28, 2018

I gave up. I don't know how this repository is maintained and noone ever came back to me on this.
My fix was deleting the database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants