Skip to content

Commit e8b73f1

Browse files
committed
#39 - Empty password is not supported
1 parent 0a82480 commit e8b73f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/github/shyiko/mysql/binlog/network/protocol/command/AuthenticateCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public byte[] toByteArray() throws IOException {
6767
buffer.write(0);
6868
}
6969
buffer.writeZeroTerminatedString(username);
70-
byte[] passwordSHA1 = passwordCompatibleWithMySQL411(password, salt);
70+
byte[] passwordSHA1 = "".equals(password) ? new byte[0] : passwordCompatibleWithMySQL411(password, salt);
7171
buffer.writeInteger(passwordSHA1.length, 1);
7272
buffer.write(passwordSHA1);
7373
if (schema != null) {

0 commit comments

Comments
 (0)