Skip to content

Fix handling of empty auth plugin names #835

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

Merged
merged 1 commit into from
Jul 18, 2018
Merged

Fix handling of empty auth plugin names #835

merged 1 commit into from
Jul 18, 2018

Conversation

julienschmidt
Copy link
Member

@julienschmidt julienschmidt commented Jul 13, 2018

Description

See #815 and #828

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

@@ -112,6 +112,9 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
mc.cleanup()
return nil, err
}
if plugin == "" {
plugin = defaultAuthPlugin
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See PyMySQL/PyMySQL#709 (comment)

When server sent "" as plugin name, it's safe to response "" as plugin_name too.

@julienschmidt julienschmidt merged commit 7ac0064 into master Jul 18, 2018
@julienschmidt julienschmidt deleted the empty_auth branch July 18, 2018 14:30
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.

3 participants