Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/commands/handlers/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const handlers = {
const saslAuth = getSaslAuth(handler);
const auth_str = saslAuth.account + '\0' +
saslAuth.account + '\0' +
saslAuth.password;
saslAuth.secret;
const b = Buffer.from(auth_str, 'utf8');
const b64 = b.toString('base64');

Expand Down Expand Up @@ -437,7 +437,9 @@ function getSaslAuth(handler) {
// An account username has been given, use it for SASL auth
return {
account: options.account.account,
password: options.account.password || '',
secret: (options.sasl_mechanism.toUpperCase() === 'AUTHCOOKIE' ?
Comment thread
Kufat marked this conversation as resolved.
Outdated
options.account.authcookie :
Comment thread
Kufat marked this conversation as resolved.
Outdated
options.account.password) || '',
};
} else if (options.account) {
// An account object existed but without auth credentials
Expand All @@ -447,7 +449,7 @@ function getSaslAuth(handler) {
// for ease of use
return {
account: options.nick,
password: options.password,
secret: options.password,
};
}

Expand Down