[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [onionoo/master] Remove the "fingerprint" parameter.



commit 4029f0fc2e3c5f83476fcb93d9d2d7b0f2dbf693
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Tue Sep 4 20:28:52 2018 +0200

    Remove the "fingerprint" parameter.
    
    This commit actually only disables the "fingerprint" parameter. Even
    though we gave people a 1 month warning, it might happen that somebody
    comes along next week and tells us their truly important use case why
    they still need this parameter. Once we're really sure this won't
    happen, we can rip out some more code that was necessary to implement
    this parameter.
    
    Implements #26919.
---
 CHANGELOG.md                                         |  1 +
 .../torproject/onionoo/server/ResourceServlet.java   |  2 +-
 .../onionoo/server/ResourceServletTest.java          | 20 ++++++++++----------
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79d7a9b..34ec5b7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
      documents.
    - Change "3_months" graphs to "6_months" graphs in all documents
      containing history objects.
+   - Remove the "fingerprint" parameter.
 
 
 # Changes in version 6.2-1.17.1 - 2018-08-17
diff --git a/src/main/java/org/torproject/onionoo/server/ResourceServlet.java b/src/main/java/org/torproject/onionoo/server/ResourceServlet.java
index 22077ae..92c6635 100644
--- a/src/main/java/org/torproject/onionoo/server/ResourceServlet.java
+++ b/src/main/java/org/torproject/onionoo/server/ResourceServlet.java
@@ -68,7 +68,7 @@ public class ResourceServlet extends HttpServlet {
   private static final long CACHE_INTERVAL = 5L * 60L * 1000L;
 
   private static Set<String> knownParameters = new HashSet<>(
-      Arrays.asList("type", "running", "search", "lookup", "fingerprint",
+      Arrays.asList("type", "running", "search", "lookup",
           "country", "as", "as_name", "flag", "first_seen_days",
           "last_seen_days", "contact", "order", "limit", "offset", "fields",
           "family", "version", "os", "host_name", "recommended_version"));
diff --git a/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java b/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
index 921d6e4..5ed4d11 100644
--- a/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
+++ b/src/test/java/org/torproject/onionoo/server/ResourceServletTest.java
@@ -1056,37 +1056,37 @@ public class ResourceServletTest {
 
   @Test(timeout = 100)
   public void testFingerprintRelayFingerprint() {
-    this.assertSummaryDocument(
+    this.assertErrorStatusCode(
         "/summary?fingerprint=000C5F55BD4814B917CC474BD537F1A3B33CCE2A",
-        1, new String[] { "TorkaZ" }, 0, null);
+        400);
   }
 
   @Test(timeout = 100)
   public void testFingerprintRelayHashedFingerprint() {
-    this.assertSummaryDocument(
+    this.assertErrorStatusCode(
         "/summary?fingerprint=4aa14c08d62913e0057a9ad5863b458c0ce94cee",
-        0, null, 0, null);
+        400);
   }
 
   @Test(timeout = 100)
   public void testFingerprintBridgeHashedFingerprint() {
-    this.assertSummaryDocument(
+    this.assertErrorStatusCode(
         "/summary?fingerprint=1FEDE50ED8DBA1DD9F9165F78C8131E4A44AB756",
-        0, null, 1, new String[] { "gummy" });
+        400);
   }
 
   @Test(timeout = 100)
   public void testFingerprintBridgeHashedHashedFingerprint() {
-    this.assertSummaryDocument(
+    this.assertErrorStatusCode(
         "/summary?fingerprint=CE52F898DB3678BCE33FAC28C92774DE90D618B5",
-        0, null, 0, null);
+        400);
   }
 
   @Test(timeout = 100)
   public void testFingerprintBridgeOriginalFingerprint() {
-    this.assertSummaryDocument(
+    this.assertErrorStatusCode(
         "/summary?fingerprint=0010D49C6DA1E46A316563099F41BFE40B6C7183",
-        0, null, 0, null);
+        400);
   }
 
   @Test(timeout = 100)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits