From c540fe2064d23e7e9de665f12d5452ce914991ff Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Fri, 28 Sep 2012 11:58:41 +0200 Subject: fix login failure with empty password. This is 5.5 specific - new code --- ext/mysqlnd/mysqlnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/mysqlnd/mysqlnd.c') diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 3fa9d11a28..557924cdaf 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -582,8 +582,8 @@ mysqlnd_run_authentication( scrambled_data = auth_plugin->methods.get_auth_data(NULL, &scrambled_data_len, conn, user, passwd, passwd_len, plugin_data, plugin_data_len, options, &conn->net->data->options, mysql_flags TSRMLS_CC); - if (!scrambled_data || conn->error_info->error_no) { - goto end; + if (conn->error_info->error_no) { + goto end; } if (FALSE == is_change_user) { ret = mysqlnd_auth_handshake(conn, user, passwd, passwd_len, db, db_len, options, mysql_flags, -- cgit v1.2.1 From 4c9e222f99731a851e20c6c0972246d079719095 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Wed, 3 Oct 2012 14:02:33 +0200 Subject: if ssl has been switched on transmit clear-text password --- ext/mysqlnd/mysqlnd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/mysqlnd/mysqlnd.c') diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 557924cdaf..f5fe075c50 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -874,6 +874,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn, saved_compression = TRUE; net->data->compressed = FALSE; } + if (net->data->ssl) { + net->data->ssl = FALSE; + } } else { unsigned int max_allowed_size = MYSQLND_ASSEMBLED_PACKET_MAX_SIZE; conn->m->set_client_option(conn, MYSQLND_OPT_MAX_ALLOWED_PACKET, (char *)&max_allowed_size TSRMLS_CC); -- cgit v1.2.1