Skip to content

Commit

Permalink
Merge pull request #505 from ramesius/scram-password
Browse files Browse the repository at this point in the history
Remove normalisation of the password when using SCRAM auth
  • Loading branch information
Nevon authored Sep 23, 2019
2 parents 72e2a10 + d610ed2 commit eeb8b9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/createScramCredentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ find_container_id() {
}

USERNAME=${USERNAME:='testscram'}
PASSWORD_256=${PASSWORD_256:='testtestscram256'}
PASSWORD_512=${PASSWORD_512:='testtestscram512'}
PASSWORD_256=${PASSWORD_256:='testtestscram=256'}
PASSWORD_512=${PASSWORD_512:='testtestscram=512'}

docker exec \
$(find_container_id) \
Expand Down
2 changes: 1 addition & 1 deletion src/broker/saslAuthenticator/scram.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ class SCRAM {
*/
encodedPassword() {
const { password } = this.connection.sasl
return SCRAM.sanitizeString(password).toString('utf-8')
return password.toString('utf-8')
}

/**
Expand Down
4 changes: 2 additions & 2 deletions testHelpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const saslSCRAM256ConnectionOpts = () =>
sasl: {
mechanism: 'scram-sha-256',
username: 'testscram',
password: 'testtestscram256',
password: 'testtestscram=256',
},
})

Expand All @@ -75,7 +75,7 @@ const saslSCRAM512ConnectionOpts = () =>
sasl: {
mechanism: 'scram-sha-512',
username: 'testscram',
password: 'testtestscram512',
password: 'testtestscram=512',
},
})

Expand Down

0 comments on commit eeb8b9f

Please sign in to comment.