mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
do not parse bodies with http urls as downloadable in omemo encrypted message. fixes #1756
This commit is contained in:
parent
b34a1f7f5e
commit
081c33b886
@ -665,16 +665,15 @@ public class Message extends AbstractEntity {
|
||||
}
|
||||
if (!url.getProtocol().equalsIgnoreCase("http") && !url.getProtocol().equalsIgnoreCase("https")) {
|
||||
return Decision.NEVER;
|
||||
} else if (oob) {
|
||||
} else if (oob || encrypted) {
|
||||
return Decision.MUST;
|
||||
}
|
||||
String extension = extractRelevantExtension(url);
|
||||
if (extension == null) {
|
||||
return Decision.NEVER;
|
||||
}
|
||||
final String extension = extractRelevantExtension(url);
|
||||
|
||||
if (encrypted) {
|
||||
return Decision.MUST;
|
||||
if (extension == null
|
||||
|| encryption == Message.ENCRYPTION_OTR
|
||||
|| encryption == Message.ENCRYPTION_AXOLOTL) {
|
||||
return Decision.NEVER;
|
||||
} else if (Transferable.VALID_IMAGE_EXTENSIONS.contains(extension)
|
||||
|| Transferable.WELL_KNOWN_EXTENSIONS.contains(extension)) {
|
||||
return Decision.SHOULD;
|
||||
|
Loading…
Reference in New Issue
Block a user