Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
743e7593 by wurstsalat at 2022-04-22T20:50:53+02:00
fix: Preview: Limit mime types for preview_allow_all_images
- - - - -
1 changed file:
- gajim/common/preview.py
Changes:
=====================================
gajim/common/preview.py
=====================================
@@ -216,6 +216,10 @@ def _accept_uri(urlparts: ParseResult,
# http/https
if urlparts.scheme in ('https', 'http'):
if app.settings.get('preview_allow_all_images'):
+ mime_type = guess_mime_type(uri)
+ if (mime_type not in MIME_TYPES or
+ mime_type == 'application/octet-stream'):
+ return False
return True
if oob_url is None:
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/743e7593b8baf4af5a2f62b6588658ece93f6c63
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/743e7593b8baf4af5a2f62b6588658ece93f6c63
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits