do not parse bodies with http urls as downloadable in omemo encrypted message. fixes #1756
This commit is contained in:
parent
c6e2a22d47
commit
228c319b96
1 changed files with 6 additions and 7 deletions
|
@ -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…
Add table
Reference in a new issue