Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2207?usp=email

to review the following change.


Change subject: socks: accept RFC 1929 version in username/password auth reply
......................................................................

socks: accept RFC 1929 version in username/password auth reply

Since d104917e the auth reply must carry VER 5, but RFC 1929 servers
reply with VER 1, so authentication against them always failed. Accept
VER 1, and keep accepting 5, which some servers send.

Change-Id: I4c6bc877c442b24b918fbda2dcc8003127483bfd
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/socks.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/07/2207/1

diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c
index 51e3a1e..6cf2715 100644
--- a/src/openvpn/socks.c
+++ b/src/openvpn/socks.c
@@ -138,8 +138,9 @@
         buf[len++] = c;
     }

-    /* VER = 5, SUCCESS = 0 --> auth success */
-    if (buf[0] != 5 || buf[1] != 0)
+    /* RFC 1929: VER = 1, STATUS = 0 --> auth success. Also accept VER = 5,
+     * which some servers send. */
+    if ((buf[0] != 1 && buf[0] != 5) || buf[1] != 0)
     {
         msg(D_LINK_ERRORS, "socks_username_password_auth: server refused the 
authentication");
         goto cleanup;

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2207?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I4c6bc877c442b24b918fbda2dcc8003127483bfd
Gerrit-Change-Number: 2207
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to