Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNPUTmice/Conversations.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-04-06 12:59:15 +0300
committerDaniel Gultsch <daniel@gultsch.de>2017-04-06 12:59:15 +0300
commit649d1243d5f7ec61838204e07a2309ec3fcd19d8 (patch)
treed5397bd3e692e50463a4702238c03eeada38420f
parent99565a68764ede1157d9df4cd92e7a7deb624541 (diff)
avoid crash on urls with missing protocols
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index c433f9c95..61881c294 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -655,7 +655,7 @@ public class Message extends AbstractEntity {
final String protocol = url.getProtocol();
final boolean encrypted = ref != null && ref.matches("([A-Fa-f0-9]{2}){48}");
return (AesGcmURLStreamHandler.PROTOCOL_NAME.equalsIgnoreCase(protocol) && encrypted)
- || ((protocol.equalsIgnoreCase("http") || protocol.equalsIgnoreCase("https")) && (oob || encrypted));
+ || (("http".equalsIgnoreCase(protocol) || "https".equalsIgnoreCase(protocol)) && (oob || encrypted));
} catch (MalformedURLException e) {
return false;