Skip to content
Snippets Groups Projects
Commit 5f043c96 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

[omemo] Handle aesgcm:// uri scheme

parent a43d5eda
No related branches found
No related tags found
No related merge requests found
......@@ -99,11 +99,14 @@ class FileDecryption:
urlparts = urlparse(url)
file = File(urlparts.geturl())
if urlparts.scheme not in ["https"] or not urlparts.netloc:
if urlparts.scheme not in ['https', 'aesgcm'] or not urlparts.netloc:
log.info("Not accepting URL for decryption: %s", url)
self.orig_handler(texttag, widget, event, iter_, kind)
return
if urlparts.scheme == 'aesgcm':
file.url = 'https://' + file.url[9:]
if not self.is_encrypted(file):
log.info('Url not encrypted: %s', url)
self.orig_handler(texttag, widget, event, iter_, kind)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment