com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/mysqlnd/mysqlnd_auth.c ext/mysqlnd/mysqlnd_connecti on.c ext/mysqlnd/mysqlnd_wireprotocol.c
| From: | Christoph Michael Becker | Date: | Tue, 20 Aug 2019 11:33:45 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/mysqlnd/mysqlnd_auth.c ext/mysqlnd/mysqlnd_connecti on.c ext/mysqlnd/mysqlnd_wireprotocol.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-107966@lists.php.net to get a copy of this message | ||
Commit: 3771d661426f33a27590b05df9c8983a2273fab6
Author: Christoph M. Becker <cmbecker69@gmx.de> Tue, 20 Aug 2019 13:32:53 +0200
Parents: 5e19f1d458556183230fe0e09a6a24b413553e9b cdf16c010a11fc1f91c8807556ccc15b374c0922
Branches: PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3771d661426f33a27590b05df9c8983a2273fab6
Log:
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
fix the problem for connect_attr, set db condition, and add a new attribute _server_host
Changed paths:
MM NEWS
MM ext/mysqlnd/mysqlnd_auth.c
MM ext/mysqlnd/mysqlnd_connection.c
MM ext/mysqlnd/mysqlnd_wireprotocol.c
Diff:
diff --cc NEWS
index c07743e,e747a4f..90e32a7
--- a/NEWS
+++ b/NEWS
@@@ -4,14 -4,14 +4,18 @@@ PH
- Core:
. Fixed bug #78220 (Can't access OneDrive folder). (cmb, ab)
- . Fixed bug #78412 (Generator incorrectly reports non-releasable $this as GC
- child). (Nikita)
+ . Fixed bug #77922 (Double release of doc comment on inherited shadow
+ property). (Nikita)
+
+- Intl:
+ . Ensure IDNA2003 rules are used with idn_to_ascii() and idn_to_utf8()
+ when requested. (Sara)
+ - MySQLnd:
+ . Fixed connect_attr issues and added the _server_host connection attribute.
+ (Qianqian Bu)
+
-29 Aug 2019, PHP 7.2.22
+29 Aug 2019, PHP 7.3.9
- Core:
. Fixed bug #78363 (Buffer overflow in zendparse). (Nikita)
diff --cc ext/mysqlnd/mysqlnd_auth.c
index e56ea20,2b23257..30ef663
--- a/ext/mysqlnd/mysqlnd_auth.c
+++ b/ext/mysqlnd/mysqlnd_auth.c
@@@ -376,60 -385,67 +376,63 @@@ mysqlnd_auth_change_user(MYSQLND_CONN_D
DBG_ENTER("mysqlnd_auth_change_user");
- chg_user_resp =
conn->payload_decoder_factory->m.get_change_user_response_packet(conn->payload_decoder_factory,
FALSE);
-
- if (!chg_user_resp) {
- SET_OOM_ERROR(conn->error_info);
- goto end;
- }
+ conn->payload_decoder_factory->m.init_change_user_response_packet(&chg_user_resp);
if (use_full_blown_auth_packet != TRUE) {
- change_auth_resp_packet =
conn->payload_decoder_factory->m.get_change_auth_response_packet(conn->payload_decoder_factory,
FALSE);
- if (!change_auth_resp_packet) {
- SET_OOM_ERROR(conn->error_info);
- goto end;
- }
+ MYSQLND_PACKET_CHANGE_AUTH_RESPONSE change_auth_resp_packet;
+
+ conn->payload_decoder_factory->m.init_change_auth_response_packet(&change_auth_resp_packet);
- change_auth_resp_packet->auth_data = auth_plugin_data;
- change_auth_resp_packet->auth_data_len = auth_plugin_data_len;
+ change_auth_resp_packet.auth_data = auth_plugin_data;
+ change_auth_resp_packet.auth_data_len = auth_plugin_data_len;
- if (!PACKET_WRITE(change_auth_resp_packet)) {
+ if (!PACKET_WRITE(conn, &change_auth_resp_packet)) {
SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE,
mysqlnd_server_gone);
+ PACKET_FREE(&change_auth_resp_packet);
goto end;
}
+
+ PACKET_FREE(&change_auth_resp_packet);
} else {
- auth_packet =
conn->payload_decoder_factory->m.get_auth_packet(conn->payload_decoder_factory, FALSE);
+ MYSQLND_PACKET_AUTH auth_packet;
- if (!auth_packet) {
- SET_OOM_ERROR(conn->error_info);
- goto end;
- }
+ conn->payload_decoder_factory->m.init_auth_packet(&auth_packet);
- auth_packet->is_change_user_packet = TRUE;
- auth_packet->user = user;
- auth_packet->db = db;
- auth_packet->db_len = db_len;
- auth_packet->silent = silent;
+ auth_packet.is_change_user_packet = TRUE;
+ auth_packet.user = user;
+ auth_packet.db = db;
+ auth_packet.db_len = db_len;
+ auth_packet.silent = silent;
- auth_packet->auth_data = auth_plugin_data;
- auth_packet->auth_data_len = auth_plugin_data_len;
- auth_packet->auth_plugin_name = auth_protocol;
+ auth_packet.auth_data = auth_plugin_data;
+ auth_packet.auth_data_len = auth_plugin_data_len;
+ auth_packet.auth_plugin_name = auth_protocol;
+ if (conn->server_capabilities & CLIENT_CONNECT_ATTRS) {
- auth_packet->connect_attr = conn->options->connect_attr;
++ auth_packet.connect_attr = conn->options->connect_attr;
+ }
if (conn->m->get_server_version(conn) >= 50123) {
- auth_packet->charset_no = conn->charset->nr;
+ auth_packet.charset_no = conn->charset->nr;
}
- if (!PACKET_WRITE(auth_packet)) {
+ if (!PACKET_WRITE(conn, &auth_packet)) {
SET_CONNECTION_STATE(&conn->state, CONN_QUIT_SENT);
SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE,
mysqlnd_server_gone);
+ PACKET_FREE(&auth_packet);
goto end;
}
+
+ PACKET_FREE(&auth_packet);
}
- ret = PACKET_READ(chg_user_resp);
- COPY_CLIENT_ERROR(conn->error_info, chg_user_resp->error_info);
+ ret = PACKET_READ(conn, &chg_user_resp);
+ COPY_CLIENT_ERROR(conn->error_info, chg_user_resp.error_info);
- if (0xFE == chg_user_resp->response_code) {
+ if (0xFE == chg_user_resp.response_code) {
ret = FAIL;
- if (!chg_user_resp->new_auth_protocol) {
+ if (!chg_user_resp.new_auth_protocol) {
DBG_ERR(mysqlnd_old_passwd);
SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd);
} else {