[glib: 1/2] gsocks5proxy: Fix SOCKS5 username/password authentication
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] gsocks5proxy: Fix SOCKS5 username/password authentication
- Date: Tue, 10 Mar 2020 15:11:39 +0000 (UTC)
commit 423b2bbc957df427c08a9e352052802f0bf6c8ba
Author: Philip Withnall <withnall endlessm com>
Date: Thu Feb 27 12:16:41 2020 +0000
gsocks5proxy: Fix SOCKS5 username/password authentication
It was checking for the main SOCKS5 version number, rather than the
subnegotiation version number. The username/password authentication
protocol is described in https://tools.ietf.org/html/rfc1929.
Spotted and diagnosed by lovetox.
Signed-off-by: Philip Withnall <withnall endlessm com>
Fixes: #1986
gio/gsocks5proxy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gio/gsocks5proxy.c b/gio/gsocks5proxy.c
index c58be8369..036aee942 100644
--- a/gio/gsocks5proxy.c
+++ b/gio/gsocks5proxy.c
@@ -229,7 +229,7 @@ set_auth_msg (guint8 *msg,
static gboolean
check_auth_status (const guint8 *data, GError **error)
{
- if (data[0] != SOCKS5_VERSION
+ if (data[0] != SOCKS5_AUTH_VERSION
|| data[1] != SOCKS5_REP_SUCCEEDED)
{
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_PROXY_AUTH_FAILED,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]