[password-resets] Convert the image to png due to a bug in imghdr not detecting the correct type when image is jpg
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [password-resets] Convert the image to png due to a bug in imghdr not detecting the correct type when image is jpg
- Date: Mon, 23 Nov 2020 11:59:25 +0000 (UTC)
commit a1c3bfe5a8e71b610af1b9c6f21114cc976a60d1
Author: Andrea Veri <averi redhat com>
Date: Mon Nov 23 12:59:11 2020 +0100
Convert the image to png due to a bug in imghdr not detecting the correct type when image is jpg
app.py | 2 +-
static/images/Mail-LockSymbol.jpg | Bin 46580 -> 0 bytes
static/images/Mail-LockSymbol.png | Bin 0 -> 17012 bytes
3 files changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/app.py b/app.py
index c28e26b..aa357c8 100644
--- a/app.py
+++ b/app.py
@@ -135,7 +135,7 @@ def send_email(email, token):
msgRoot.add_related(image1, maintype='image',
subtype=imghdr.what(None, image1), cid='<image1>')
- with open(f"{DOCUMENT_ROOT}/static/images/Mail-LockSymbol.jpg", 'rb') as _img2:
+ with open(f"{DOCUMENT_ROOT}/static/images/Mail-LockSymbol.png", 'rb') as _img2:
image2 = _img2.read()
msgRoot.add_related(image2, maintype='image',
subtype=imghdr.what(None, image2), cid='<image2>')
diff --git a/static/images/Mail-LockSymbol.png b/static/images/Mail-LockSymbol.png
new file mode 100644
index 0000000..bdebb9f
Binary files /dev/null and b/static/images/Mail-LockSymbol.png differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]