aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-12-27 18:37:12 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-12-27 18:37:12 +0100
commit703d95fcf84d720567cefe1483695d76f32ebb34 (patch)
tree2cfafd3cd9658dfb52ec7a032d6297ac788b8a76 /src/main/java/eu/siacs
parentc3bdec1ce9a28cadc2cacbe619801e94829118e8 (diff)
lower case all fingerprints. fixes #1521
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/CryptoHelper.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java
index 5c504e04..1ef5fb3f 100644
--- a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java
@@ -19,6 +19,7 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Locale;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
@@ -94,7 +95,7 @@ public final class CryptoHelper {
} else if (fingerprint.length() < 40) {
return fingerprint;
}
- StringBuilder builder = new StringBuilder(fingerprint.replaceAll("\\s",""));
+ StringBuilder builder = new StringBuilder(fingerprint.toLowerCase(Locale.US).replaceAll("\\s", ""));
for(int i=8;i<builder.length();i+=9) {
builder.insert(i, ' ');
}