[tor-commits] [tor/release-0.2.2] Log malformed HS descriptor requests at the proper level

arma at torproject.org arma at torproject.org
Fri Jun 3 19:25:53 UTC 2011


commit 96b929e743dc68f706f374c3448ed27c54a9cead
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Mon Mar 14 01:11:30 2011 -0700

    Log malformed HS descriptor requests at the proper level
    
    This log message should be a 'protocol warning', not a 'warning'.
---
 changes/bug2748     |    5 +++++
 src/or/rendcommon.c |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/changes/bug2748 b/changes/bug2748
index 647000d..b522560 100644
--- a/changes/bug2748
+++ b/changes/bug2748
@@ -1,5 +1,10 @@
   o Minor bugfixes
     - Remove dead code from rend_cache_lookup_v2_desc_as_dir.  Fixes
       part of bug 2748; bugfix on 0.2.0.10-alpha.
+    - Log malformed requests for rendezvous descriptors as protocol
+      warnings, not warnings.  Also, use a more informative log
+      message in case someone sees it at log level warning without
+      prior info-level messages.  Fixes the other part of bug 2748;
+      bugfix on 0.2.0.10-alpha.
 
 
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index ff3a401..9acc641 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -1004,8 +1004,10 @@ rend_cache_lookup_v2_desc_as_dir(const char *desc_id, const char **desc)
   tor_assert(rend_cache_v2_dir);
   if (base32_decode(desc_id_digest, DIGEST_LEN,
                     desc_id, REND_DESC_ID_V2_LEN_BASE32) < 0) {
-    log_warn(LD_REND, "Descriptor ID contains illegal characters: %s",
-             safe_str(desc_id));
+    log_fn(LOG_PROTOCOL_WARN, LD_REND,
+           "Rejecting v2 rendezvous descriptor request -- descriptor ID "
+           "contains illegal characters: %s",
+           safe_str(desc_id));
     return -1;
   }
   /* Lookup descriptor and return. */





More information about the tor-commits mailing list