Skip to content

Commit 86c2c23

Browse files
Change so that it returns a function instead of the password value
1 parent e595430 commit 86c2c23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/auth_plugins/mysql_clear_password.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ module.exports = pluginOptions => ({ connection, command }) => {
44
const password =
55
command.password || pluginOptions.password || connection.config.password;
66

7-
return Buffer.from(`${password}\0`)
7+
const cleartextPassword = function(password) {
8+
return Buffer.from(`${password}\0`)
9+
};
10+
11+
return cleartextPassword(password)
812
};

0 commit comments

Comments
 (0)