Merge branch '1986-socks-version' into 'master'

gsocks5proxy: Fix SOCKS5 username/password authentication

Closes #1986

See merge request GNOME/glib!1391
This commit is contained in:
Sebastian Dröge 2020-03-10 15:11:09 +00:00
commit 711de654e2

View File

@ -243,7 +243,7 @@ set_auth_msg (guint8 *msg,
static gboolean static gboolean
check_auth_status (const guint8 *data, GError **error) check_auth_status (const guint8 *data, GError **error)
{ {
if (data[0] != SOCKS5_VERSION if (data[0] != SOCKS5_AUTH_VERSION
|| data[1] != SOCKS5_REP_SUCCEEDED) || data[1] != SOCKS5_REP_SUCCEEDED)
{ {
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_AUTH_FAILED, g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_AUTH_FAILED,