Skip to content

Commit 2f7adb7

Browse files
author
Samar Pratap Singh
committed
WL#16269 OpenID Connect (Oauth2 - JWT) Authentication Support
[post-push fix] The plugin option id-token-file is remembered between sessions. ID token is like a password and it should be freed once it is no longer needed. Approved by: Miroslav Rajcic <miroslav.rajcic@oracle.com>
1 parent 603ef65 commit 2f7adb7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libmysql/authentication_openid_connect_client/authentication_openid_connect_client_plugin.cc

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static int openid_connect_authentication_client_plugin(MYSQL_PLUGIN_VIO *vio,
129129
std::string token, id_token_file(s_id_token_location);
130130
// Check if the file exists
131131
const int fd = open(filename, O_RDONLY);
132+
free_plugin_option(s_id_token_location);
132133
if (fd == -1) {
133134
log_error("Unable to open ID token file: " + id_token_file);
134135
return CR_AUTH_USER_CREDENTIALS;

0 commit comments

Comments
 (0)