[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9041: Fix bug 338: log verbose nicknames, not just keys, for intro (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9041: Fix bug 338: log verbose nicknames, not just keys, for intro (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Thu, 7 Dec 2006 12:04:46 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 07 Dec 2006 12:04:55 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2006-12-07 12:04:44 -0500 (Thu, 07 Dec 2006)
New Revision: 9041
Modified:
tor/trunk/
tor/trunk/ChangeLog
tor/trunk/src/or/rendservice.c
Log:
r11458@Kushana: nickm | 2006-12-07 12:04:22 -0500
Fix bug 338: log verbose nicknames, not just keys, for intro points. Also, suppress intro point name logging when SafeLogging is 1. (The security part is a possible backport candidate.)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r11458] on c95137ef-5f19-0410-b913-86e773d04f59
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2006-12-07 15:10:36 UTC (rev 9040)
+++ tor/trunk/ChangeLog 2006-12-07 17:04:44 UTC (rev 9041)
@@ -9,6 +9,10 @@
would prevent the cached-routers file from ever loading. (reported by
John Kimble.)
+ o Security bugfixes:
+ - Do not log introduction points for hidden services if SafeLogging
+ is set.
+
o Controller bugfixes:
- Report the circuit number correctly in STREAM CLOSED events. (Bug
reported by Mike Perry.)
Modified: tor/trunk/src/or/rendservice.c
===================================================================
--- tor/trunk/src/or/rendservice.c 2006-12-07 15:10:36 UTC (rev 9040)
+++ tor/trunk/src/or/rendservice.c 2006-12-07 17:04:44 UTC (rev 9041)
@@ -305,8 +305,8 @@
for (i=0; i < n; ++i) {
router = router_get_by_nickname(smartlist_get(service->intro_nodes, i),1);
if (!router) {
- log_info(LD_REND,"Router '%s' not found. Skipping.",
- (char*)smartlist_get(service->intro_nodes, i));
+ log_info(LD_REND,"Router '%s' not found for intro point %d. Skipping.",
+ safe_str((char*)smartlist_get(service->intro_nodes, i)), i);
continue;
}
circ = find_intro_circuit(router, service->pk_digest);
@@ -540,7 +540,7 @@
router = router_get_by_nickname(rp_nickname, 0);
if (!router) {
log_info(LD_REND, "Couldn't find router %s named in rendezvous cell.",
- escaped(rp_nickname));
+ escaped_safe_str(rp_nickname));
/* XXXX Add a no-such-router reason? */
reason = END_CIRC_REASON_TORPROTOCOL;
goto err;
@@ -591,7 +591,7 @@
if (!launched) { /* give up */
log_warn(LD_REND, "Giving up launching first hop of circuit to rendezvous "
"point '%s' for service %s.",
- extend_info->nickname, serviceid);
+ escaped_safe_str(extend_info->nickname), serviceid);
reason = END_CIRC_REASON_CONNECTFAILED;
goto err;
}
@@ -1110,7 +1110,8 @@
int i,j;
routerinfo_t *router;
rend_service_t *service;
- char *nickname;
+ const char *nickname, *safe_name;
+ char nn_buf[MAX_VERBOSE_NICKNAME_LEN];
origin_circuit_t *circ;
for (i=0; i < smartlist_len(rend_service_list); ++i) {
@@ -1119,19 +1120,26 @@
service->directory);
for (j=0; j < smartlist_len(service->intro_nodes); ++j) {
nickname = smartlist_get(service->intro_nodes, j);
- router = router_get_by_nickname(smartlist_get(service->intro_nodes,j),1);
+ router = router_get_by_nickname(nickname,1);
+ if (router) {
+ router_get_verbose_nickname(nn_buf, router);
+ nickname = nn_buf;
+ }
+ safe_name = safe_str(nickname);
+
if (!router) {
- log(severity, LD_GENERAL, " Intro point at %s: unrecognized router",
- nickname);
+ log(severity, LD_GENERAL, " Intro point %d at %s: unrecognized router",
+ j, safe_name);
continue;
}
circ = find_intro_circuit(router, service->pk_digest);
if (!circ) {
- log(severity, LD_GENERAL, " Intro point at %s: no circuit",nickname);
+ log(severity, LD_GENERAL, " Intro point %d at %s: no circuit",
+ j, safe_name);
continue;
}
- log(severity, LD_GENERAL, " Intro point at %s: circuit is %s",nickname,
- circuit_state_to_string(circ->_base.state));
+ log(severity, LD_GENERAL, " Intro point %d at %s: circuit is %s",
+ j, safe_name, circuit_state_to_string(circ->_base.state));
}
}
}