Skip to content

Commit

Permalink
[CONJS-218] ensure Pam authentication when using pam_use_cleartext_pl…
Browse files Browse the repository at this point in the history
…ugin and multiple password
  • Loading branch information
rusher committed Aug 22, 2022
1 parent e8807e9 commit 0bbe1b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cmd/handshake/auth/clear-password-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ class ClearPasswordAuth extends PluginAuth {
constructor(packSeq, compressPackSeq, pluginData, cmdParam, resolve, reject, multiAuthResolver) {
super(cmdParam, resolve, reject, multiAuthResolver);
this.sequenceNo = packSeq;
this.counter = 0;
}

start(out, opts, info) {
out.startPacket(this);
const pwd = opts.password;
if (pwd) {
if (Array.isArray(pwd)) {
out.writeString(pwd[0]);
out.writeString(pwd[this.counter++]);
} else {
out.writeString(pwd);
}
Expand Down

0 comments on commit 0bbe1b4

Please sign in to comment.