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');
9
9
const sha256_password = require ( '../auth_plugins/sha256_password' ) ;
10
10
const caching_sha2_password = require ( '../auth_plugins/caching_sha2_password.js' ) ;
11
11
const mysql_native_password = require ( '../auth_plugins/mysql_native_password.js' ) ;
12
+ const mysql_clear_password = require ( '../auth_plugins/mysql_clear_password.js' ) ;
12
13
13
14
const standardAuthPlugins = {
14
15
sha256_password : sha256_password ( { } ) ,
15
16
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 ( { } )
17
19
} ;
18
20
19
21
function warnLegacyAuthSwitch ( ) {
You can’t perform that action at this time.
0 commit comments