[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] list the port and socks version when complaining about unsa...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] list the port and socks version when complaining about unsa...
- From: arma@seul.org (Roger Dingledine)
- Date: Sat, 7 Aug 2004 00:03:03 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 07 Aug 2004 00:03:19 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
buffers.c
Log Message:
list the port and socks version when complaining about unsafe socks
Index: buffers.c
===================================================================
RCS file: /home/or/cvsroot/src/or/buffers.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- buffers.c 6 Aug 2004 19:44:17 -0000 1.101
+++ buffers.c 7 Aug 2004 04:03:01 -0000 1.102
@@ -484,10 +484,7 @@
log_fn(LOG_DEBUG,"socks5: ipv4 address type");
if(buf->datalen < 10) /* ip/port there? */
return 0; /* not yet */
- if(!have_warned_about_unsafe_socks) {
- log_fn(LOG_WARN,"Your application is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.");
-// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
- }
+
destip = ntohl(*(uint32_t*)(buf->mem+4));
in.s_addr = htonl(destip);
tmpbuf = inet_ntoa(in);
@@ -499,6 +496,10 @@
strcpy(req->address,tmpbuf);
req->port = ntohs(*(uint16_t*)(buf->mem+8));
buf_remove_from_front(buf, 10);
+ if(!have_warned_about_unsafe_socks) {
+ log_fn(LOG_WARN,"Your application (socks5, on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.", req->port);
+// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
+ }
return 1;
case 3: /* fqdn */
log_fn(LOG_DEBUG,"socks5: fqdn address type");
@@ -565,7 +566,7 @@
startaddr = next+1;
if(socks4_prot != socks4a && !have_warned_about_unsafe_socks) {
- log_fn(LOG_WARN,"Your application is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.");
+ log_fn(LOG_WARN,"Your application (socks4, on port %d) is giving Tor only an IP address. Applications that do DNS resolves themselves may leak information. Consider using Socks4A (e.g. via privoxy or socat) instead.", req->port);
// have_warned_about_unsafe_socks = 1; // (for now, warn every time)
}
if(socks4_prot == socks4a) {