diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-06-29 12:16:09 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-29 12:16:09 -0400 |
commit | 204bce7e3ca0f60cfec1d8be700848309f605abd (patch) | |
tree | 85512267e4ade878feb98e5d1c9bc43ca9565281 /src/or/buffers.c | |
parent | aec396d9d0c2db18d44c9ad850bedbc01d50e40a (diff) | |
download | tor-204bce7e3ca0f60cfec1d8be700848309f605abd.tar.gz tor-204bce7e3ca0f60cfec1d8be700848309f605abd.zip |
If we negotiate authentication, require it.
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index bbd60c4357..7b212a7d33 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1716,6 +1716,11 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req, return r; } + if (req->auth_type != SOCKS_NO_AUTH && !req->got_auth) { + log_warn(LD_APP, + "socks5: negotiated authentication, but none provided"); + return -1; + } /* we know the method; read in the request */ log_debug(LD_APP,"socks5: checking request"); if (datalen < 8) {/* basic info plus >=2 for addr plus 2 for port */ |