File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ const handlers = {
302
302
const saslAuth = getSaslAuth ( handler ) ;
303
303
const auth_str = saslAuth . account + '\0' +
304
304
saslAuth . account + '\0' +
305
- saslAuth . password ;
305
+ saslAuth . secret ;
306
306
const b = Buffer . from ( auth_str , 'utf8' ) ;
307
307
const b64 = b . toString ( 'base64' ) ;
308
308
@@ -437,7 +437,9 @@ function getSaslAuth(handler) {
437
437
// An account username has been given, use it for SASL auth
438
438
return {
439
439
account : options . account . account ,
440
- password : options . account . password || '' ,
440
+ secret : ( options . sasl_mechanism . toUpperCase ( ) === 'AUTHCOOKIE' ?
441
+ options . account . authcookie :
442
+ options . account . password ) || '' ,
441
443
} ;
442
444
} else if ( options . account ) {
443
445
// An account object existed but without auth credentials
@@ -447,7 +449,7 @@ function getSaslAuth(handler) {
447
449
// for ease of use
448
450
return {
449
451
account : options . nick ,
450
- password : options . password ,
452
+ secret : options . password ,
451
453
} ;
452
454
}
453
455
You can’t perform that action at this time.
0 commit comments