Merge pull request #7743 from dmitriy-myz/fix-mysql-wire-auth

MySQL wire protocol: wrong source ip
This commit is contained in:
alexey-milovidov 2019-11-14 20:33:17 +03:00 committed by GitHub
commit 698cb6c3ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,9 +223,10 @@ void MySQLHandler::authenticate(const String & user_name, const String & auth_pl
authPluginSSL();
}
try {
try
{
std::optional<String> auth_response = auth_plugin_name == auth_plugin->getName() ? std::make_optional<String>(initial_auth_response) : std::nullopt;
auth_plugin->authenticate(user_name, auth_response, connection_context, packet_sender, secure_connection, socket().address());
auth_plugin->authenticate(user_name, auth_response, connection_context, packet_sender, secure_connection, socket().peerAddress());
}
catch (const Exception & exc)
{