[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/master] Don't consider relay-search queries for just a date as valid.
commit 6bcd7afa6395202c410384a1fa16400e86ca68e6
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Tue Oct 4 10:22:35 2011 +0200
Don't consider relay-search queries for just a date as valid.
---
.../torproject/ernie/web/RelaySearchServlet.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/org/torproject/ernie/web/RelaySearchServlet.java b/src/org/torproject/ernie/web/RelaySearchServlet.java
index 6e056f5..1791017 100644
--- a/src/org/torproject/ernie/web/RelaySearchServlet.java
+++ b/src/org/torproject/ernie/web/RelaySearchServlet.java
@@ -151,6 +151,7 @@ public class RelaySearchServlet extends HttpServlet {
sb.append(".");
}
searchIPAddress = sb.toString().substring(1);
+ validQuery = true;
}
/* If the search term contains hyphens, it must be a month or a
@@ -181,6 +182,7 @@ public class RelaySearchServlet extends HttpServlet {
else if (searchTerm.length() >= 8 && searchTerm.length() <= 19 &&
hexPattern.matcher(searchTerm).matches()) {
searchFingerprintOrNickname.add(searchTerm);
+ validQuery = true;
}
/* If the search term contains between 20 and 40 hex characters,
@@ -192,6 +194,7 @@ public class RelaySearchServlet extends HttpServlet {
break;
}
searchFingerprint = searchTerm;
+ validQuery = true;
}
/* If the search term contains up to 19 alphanumerical characters,
@@ -203,6 +206,7 @@ public class RelaySearchServlet extends HttpServlet {
break;
}
searchNickname = searchTerm;
+ validQuery = true;
}
/* We didn't recognize this search term. */
@@ -210,10 +214,6 @@ public class RelaySearchServlet extends HttpServlet {
validQuery = false;
break;
}
-
- /* We recognized at least one search term, so that the query is
- * potentially valid. */
- validQuery = true;
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits