Bugzilla – Attachment 2644 Details for
Bug 2250
SOCKS5 should return "NO ACCEPTABLE METHODS" instead of nothing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Return "NO ACCEPTABLE METHODS" if we don't find the method we are looking for
ssh-socks4-nomethod.patch (text/plain), 1.26 KB, created by
Darren Tucker
on 2015-06-05 14:07:41 AEST
(
hide
)
Description:
Return "NO ACCEPTABLE METHODS" if we don't find the method we are looking for
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2015-06-05 14:07:41 AEST
Size:
1.26 KB
patch
obsolete
>diff --git a/channels.c b/channels.c >index b0b1c58..d806026 100644 >--- a/channels.c >+++ b/channels.c >@@ -1145,7 +1145,8 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) > > /* try to decode a socks5 header */ > #define SSH_SOCKS5_AUTHDONE 0x1000 >-#define SSH_SOCKS5_NOAUTH 0x00 >+#define SSH_SOCKS5_NOAUTH 0x00 /* NO AUTHENTICATION REQUIRED */ >+#define SSH_SOCKS5_NOMETHOD 0xff /* NO ACCEPTABLE METHODS */ > #define SSH_SOCKS5_IPV4 0x01 > #define SSH_SOCKS5_DOMAIN 0x03 > #define SSH_SOCKS5_IPV6 0x04 >@@ -1186,15 +1187,16 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset) > break; > } > } >+ buffer_consume(&c->input, nmethods + 2); >+ buffer_put_char(&c->output, 0x05); /* version */ >+ buffer_put_char(&c->output, found ? SSH_SOCKS5_NOAUTH : >+ SSH_SOCKS5_NOMETHOD); /* method */ >+ FD_SET(c->sock, writeset); > if (!found) { > debug("channel %d: method SSH_SOCKS5_NOAUTH not found", > c->self); > return -1; > } >- buffer_consume(&c->input, nmethods + 2); >- buffer_put_char(&c->output, 0x05); /* version */ >- buffer_put_char(&c->output, SSH_SOCKS5_NOAUTH); /* method */ >- FD_SET(c->sock, writeset); > c->flags |= SSH_SOCKS5_AUTHDONE; > debug2("channel %d: socks5 auth done", c->self); > return 0; /* need more */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2250
: 2644