File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ 'use strict'
2+
3+ module . exports = pluginOptions => ( { connection, command } ) => {
4+ const password =
5+ command . password || pluginOptions . password || connection . config . password ;
6+
7+ const cleartextPassword = function ( password ) {
8+ return Buffer . from ( `${ password } \0` )
9+ } ;
10+
11+ return cleartextPassword ( password )
12+ } ;
Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ const Packets = require('../packets/index.js');
99const sha256_password = require ( '../auth_plugins/sha256_password' ) ;
1010const caching_sha2_password = require ( '../auth_plugins/caching_sha2_password.js' ) ;
1111const mysql_native_password = require ( '../auth_plugins/mysql_native_password.js' ) ;
12+ const mysql_clear_password = require ( '../auth_plugins/mysql_clear_password.js' ) ;
1213
1314const standardAuthPlugins = {
1415 sha256_password : sha256_password ( { } ) ,
1516 caching_sha2_password : caching_sha2_password ( { } ) ,
16- mysql_native_password : mysql_native_password ( { } )
17+ mysql_native_password : mysql_native_password ( { } ) ,
18+ mysql_clear_password : mysql_clear_password ( { } )
1719} ;
1820
1921function warnLegacyAuthSwitch ( ) {
You can’t perform that action at this time.
0 commit comments