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

Fix regression in username validation #602

Merged
merged 1 commit into from Nov 14, 2014
Merged

Fix regression in username validation #602

merged 1 commit into from Nov 14, 2014

Conversation

MasonM
Copy link
Contributor

@MasonM MasonM commented Nov 13, 2014

Commit cdd7132 added logic to catch invalid database usernames,
but the regex it uses fails to match usernames with special characters that are properly quoted,
causing errors with usernames that used to work in versions < 3.0.0. This fixes the regex so that
if the username is quoted, anything is allowed between the quotes.

From the docs (http://dev.mysql.com/doc/refman/5.5/en/identifiers.html):
"Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP),
except U+0000"

Commit cdd7132 added logic to catch invalid database usernames,
but the regex it uses fails to match usernames with special characters that are properly quoted,
causing errors with usernames that used to work in versions < 3.0.0. This fixes the regex so that
if the username is quoted, anything is allowed between the quotes.

From the docs (http://dev.mysql.com/doc/refman/5.5/en/identifiers.html):
"Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP),
except U+0000"
@igalic
Copy link
Contributor

igalic commented Nov 14, 2014

ooh.. nice. thanks for the catch.

igalic added a commit that referenced this pull request Nov 14, 2014
@igalic igalic merged commit 22b07ae into puppetlabs:master Nov 14, 2014
@igalic
Copy link
Contributor

igalic commented Nov 14, 2014

(i've merging this despite a travis failure with ruby 2.0.0, because from what i gather it's either travis related, or puppet-lint doesn't work with ruby 2.0)

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

Successfully merging this pull request may close these issues.

None yet

3 participants