diff options
author | Arun Kuruvila <arun.kuruvila@oracle.com> | 2018-05-14 11:28:13 +0530 |
---|---|---|
committer | Arun Kuruvila <arun.kuruvila@oracle.com> | 2018-05-14 11:28:13 +0530 |
commit | bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 (patch) | |
tree | edd7cd934b73b1126014172b9a1b10d03e61cbbb /libmysqld | |
parent | 6d570d729682039edd6c490187a0434e7d75d486 (diff) | |
download | mariadb-git-bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2.tar.gz |
Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7
Description:- Client applications establishes connection to
server, which does not support SSL, via TCP even when SSL is
enforced via MYSQL_OPT_SSL_MODE or MYSQL_OPT_SSL_ENFORCE or
MYSQL_OPT_SSL_VERIFY_SERVER_CERT.
Analysis:- There exist no error handling for catching client
applications which enforces SSL connection to connect to a
server which does not support SSL.
Fix:- Error handling is done to catch above mentioned
scenarios.
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/libmysqld.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index 6de1e3383d2..85ca0cf4bd8 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -173,6 +173,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, if (db) client_flag|=CLIENT_CONNECT_WITH_DB; + if (embedded_ssl_check(mysql)) + goto error; + mysql->info_buffer= my_malloc(MYSQL_ERRMSG_SIZE, MYF(0)); mysql->thd= create_embedded_thd(client_flag); |