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

[tor-commits] [tor/main] dirauth: Reject EOL 0.3.5.x relays



commit 7eb543787873230e4fd51da42b74a9a771840cd9
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date:   Mon Feb 14 13:40:45 2022 -0500

    dirauth: Reject EOL 0.3.5.x relays
    
    Closes #40559
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
 changes/ticket40559                 |  2 ++
 src/feature/dirauth/process_descs.c | 17 ++---------------
 src/test/test_process_descs.c       |  7 ++++---
 3 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/changes/ticket40559 b/changes/ticket40559
new file mode 100644
index 0000000000..9aa464f446
--- /dev/null
+++ b/changes/ticket40559
@@ -0,0 +1,2 @@
+  o Minor feature (authority, relay):
+    - Reject End-Of-Life relays running version 0.3.5.x. Closes ticket 40559.
diff --git a/src/feature/dirauth/process_descs.c b/src/feature/dirauth/process_descs.c
index a75f516dca..7d61247e23 100644
--- a/src/feature/dirauth/process_descs.c
+++ b/src/feature/dirauth/process_descs.c
@@ -404,21 +404,8 @@ dirserv_rejects_tor_version(const char *platform,
   static const char please_upgrade_string[] =
     "Tor version is insecure or unsupported. Please upgrade!";
 
-  /* Versions before Tor 0.3.5 are unsupported.
-   *
-   * Also, reject unstable versions of 0.3.5, since (as of this writing)
-   * they are almost none of the network. */
-  if (!tor_version_as_new_as(platform,"0.3.5.7")) {
-    if (msg)
-      *msg = please_upgrade_string;
-    return true;
-  }
-
-  /* Series between Tor 0.3.6.x and 0.4.5.5-rc inclusive are unsupported.
-   * Reject them. 0.3.6.0-alpha-dev only existed for a short time, before it
-   * was renamed to 0.4.0.0-alpha-dev. */
-  if (tor_version_as_new_as(platform,"0.3.6.0-alpha-dev") &&
-      !tor_version_as_new_as(platform,"0.4.5.6")) {
+  /* Anything before 0.4.5.6 is unsupported. Reject them. */
+  if (!tor_version_as_new_as(platform,"0.4.5.6")) {
     if (msg) {
       *msg = please_upgrade_string;
     }
diff --git a/src/test/test_process_descs.c b/src/test/test_process_descs.c
index 5503fc69ee..1471bec18e 100644
--- a/src/test/test_process_descs.c
+++ b/src/test/test_process_descs.c
@@ -21,9 +21,9 @@ test_process_descs_versions(void *arg)
     // a non-tor program: don't reject.
     { "Wombat 0.1.2.3-alpha", false },
     // some unsupported versions: reject.
+    { "Tor 0.2.9.100", true },
     { "Tor 0.2.9.4-alpha", true },
     { "Tor 0.2.9.5-alpha", true },
-    { "Tor 0.2.9.100", true },
     { "Tor 0.3.0.0-alpha-dev", true },
     { "Tor 0.3.0.2-alpha", true },
     { "Tor 0.3.0.5", true },
@@ -34,6 +34,8 @@ test_process_descs_versions(void *arg)
     { "Tor 0.3.4.100", true },
     { "Tor 0.3.5.1-alpha", true },
     { "Tor 0.3.5.6-rc", true},
+    { "Tor 0.3.5.7", true },
+    { "Tor 0.3.5.8", true },
     { "Tor 0.4.0.1-alpha", true },
     { "Tor 0.4.0.5", true },
     { "Tor 0.4.1.1-alpha", true },
@@ -47,12 +49,11 @@ test_process_descs_versions(void *arg)
     { "Tor 0.4.4.9", true },
     { "Tor 0.4.5.5-rc", true },
     // new enough to be supported
-    { "Tor 0.3.5.7", false },
-    { "Tor 0.3.5.8", false },
     { "Tor 0.4.5.6", false },
     { "Tor 0.4.6.0-alpha-dev", false },
     { "Tor 0.4.6.5", false },
     { "Tor 0.4.7.0-alpha-dev", false },
+    { "Tor 0.4.7.3-alpha", false },
     // Very far in the future
     { "Tor 100.100.1.5", false },
   };



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