1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 14:22:05 +01:00

Bugfix in SOCKS5 authentication

Read password bytes from the correct field.
Fixes SMACK-796, introduced with 4c64643
This commit is contained in:
lohse 2018-01-19 11:38:17 +01:00
parent ae46f653fd
commit 93683389e3

View file

@ -137,7 +137,7 @@ public class Socks5ProxySocketConnection implements ProxySocketConnection {
System.arraycopy(userBytes, 0, buf, index, System.arraycopy(userBytes, 0, buf, index,
user.length()); user.length());
index += user.length(); index += user.length();
byte[] passwordBytes = user.getBytes(StringUtils.UTF8); byte[] passwordBytes = passwd.getBytes(StringUtils.UTF8);
buf[index++] = (byte) (passwordBytes.length); buf[index++] = (byte) (passwordBytes.length);
System.arraycopy(passwordBytes, 0, buf, index, System.arraycopy(passwordBytes, 0, buf, index,
passwd.length()); passwd.length());