[omemo] Handle aesgcm:// uri scheme
This commit is contained in:
@@ -80,10 +80,14 @@ class FileDecryption:
|
|||||||
urlparts = urlparse(url)
|
urlparts = urlparse(url)
|
||||||
file = File(urlparts.geturl())
|
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)
|
log.info("Not accepting URL for decryption: %s", url)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if urlparts.scheme == 'aesgcm':
|
||||||
|
log.debug('aesgcm scheme detected')
|
||||||
|
file.url = 'https://' + file.url[9:]
|
||||||
|
|
||||||
if not self.is_encrypted(file):
|
if not self.is_encrypted(file):
|
||||||
log.info('Url not encrypted: %s', url)
|
log.info('Url not encrypted: %s', url)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user