[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-lib/master] Also accept lower-case hex fingerprints.
commit a42848728fa6d76f053120dd8d5828786b50ea34
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Sun Jan 8 16:45:45 2012 +0100
Also accept lower-case hex fingerprints.
---
.../torproject/descriptor/impl/ParseHelper.java | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/org/torproject/descriptor/impl/ParseHelper.java b/src/org/torproject/descriptor/impl/ParseHelper.java
index 9284513..1f03517 100644
--- a/src/org/torproject/descriptor/impl/ParseHelper.java
+++ b/src/org/torproject/descriptor/impl/ParseHelper.java
@@ -133,14 +133,14 @@ public class ParseHelper {
}
private static Pattern twentyByteHexPattern =
- Pattern.compile("^[0-9A-F]{40}$");
+ Pattern.compile("^[0-9a-fA-F]{40}$");
public static String parseTwentyByteHexString(String line,
String hexString) throws DescriptorParseException {
if (!twentyByteHexPattern.matcher(hexString).matches()) {
throw new DescriptorParseException("Illegal hex string in line '"
+ line + "'.");
}
- return hexString;
+ return hexString.toUpperCase();
}
public static SortedMap<String, Integer> parseKeyValuePairs(String line,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits