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

[tor-commits] [metrics-lib/master] Accept transport lines containing more than just the transport name.



commit 25f0e656c467121c9316876584b1762e7d4bd166
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Aug 6 08:08:44 2012 +0200

    Accept transport lines containing more than just the transport name.
    
    Sanitized bridge descriptors contain transport lines with just the
    transport name.  However, there are now relays including unsanitized
    transport lines, most likely because of a configuration problem.  Don't
    reject the entire descriptor when encountering those lines.
---
 .../descriptor/impl/ExtraInfoDescriptorImpl.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java b/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
index 0a0bf1a..45848d2 100644
--- a/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
+++ b/src/org/torproject/descriptor/impl/ExtraInfoDescriptorImpl.java
@@ -571,7 +571,7 @@ public class ExtraInfoDescriptorImpl extends DescriptorImpl
 
   private void parseTransportLine(String line, String lineNoOpt,
       String[] partsNoOpt) throws DescriptorParseException {
-    if (partsNoOpt.length != 2) {
+    if (partsNoOpt.length < 2) {
       throw new DescriptorParseException("Illegal line '" + line + "'.");
     }
     this.transports.add(partsNoOpt[1]);

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