Skip to content

Commit

Permalink
Use Buffer.from instead of Buffer.alloc (compatibility with older nod…
Browse files Browse the repository at this point in the history
…e versions)
  • Loading branch information
ZJONSSON committed Mar 29, 2020
1 parent 63f6bfe commit cbdcae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/unit/connection/test-auth-switch-clear-insecure.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ server.on('connection', function(incomingConnection) {
incomingConnection.on('clientAuthentication', function () {
this.authSwitchRequest({
authMethodName : 'mysql_clear_password',
authMethodData : Buffer.alloc(0)
authMethodData : Buffer.from('')
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/connection/test-auth-switch-clear-secure.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server.on('connection', function(incomingConnection) {
incomingConnection.on('clientAuthentication', function () {
this.authSwitchRequest({
authMethodName : 'mysql_clear_password',
authMethodData : Buffer.alloc(0)
authMethodData : Buffer.from('')
});
});

Expand Down

0 comments on commit cbdcae3

Please sign in to comment.