🐛 Bug Report: HTML email is malformed; images don't load #359

Closed
opened 2025-10-09 16:41:50 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @EweSparky on GitHub.

Reproduction steps

I logged in to an app on a new device and received an email alerting me about the action.

Expected behavior

The email loads in my email client; enabling image loading allows the images in the email to show.

Actual Behavior

The Pocket ID logo image is broken. Checking the source code shows the following (only the <body> tag is included):

<body>
    <div class=3D"container">
       =20
    <div class=3D"header">
        <div class=3D"logo">
            <img src=3D"https://id.example.com/api/application-configura=
tion/logo" alt=3D"Pocket ID"/>
            <h1>Pocket ID</h1>
        </div>
        <div class=3D"warning">Warning</div>
    </div>
    <div class=3D"content">
        <h2>New Sign-In Detected</h2>
        <div class=3D"grid">
           =20
            <div>
                <p class=3D"label">Approximate Location</p>
                <p>LAN/Docker/k8s, Internal Network</p>
            </div>
           =20
            <div>
                <p class=3D"label">IP Address</p>
                <p>192.168.1.11</p>
            </div>
            <div>
                <p class=3D"label">Device</p>
                <p>Chrome on Linux x86_64</p>
            </div>
            <div>
                <p class=3D"label">Sign-In Time</p>
                <p>2025-02-14 12:02:02 UTC</p>
            </div>
        </div>
        <p class=3D"message">
            This sign-in was detected from a new device or location. If you=
 recognize this activity, you can
            safely ignore this message. If not, please review your account =
and security settings.
        </p>
    </div>

    </div>
</body>

The email client shows:

Pocket ID

Warning
New Sign-In Detected

Approximate Location

LAN/Docker/k8s, Internal Network

IP Address

192.168.1.11

Device

Chrome on Linux x86_64

Sign-In Time

2025-02-14 12:02:02 UTC

This sign-in was detected from a new device or location. If you recognize this activity, you can safely ignore this message. If not, please review your account and security settings.

So, some of the rubbish in the HTML source doesn't show in the email client, but the image reference is broken nonetheless. If I manually go to https://id.example.com/api/application-configuration/logo, it works.

Is this an issue with Pocket ID or the email client?

Thanks.

Version and Environment

0.32.0

Log Output

No response

Originally created by @EweSparky on GitHub. ### Reproduction steps I logged in to an app on a new device and received an email alerting me about the action. ### Expected behavior The email loads in my email client; enabling image loading allows the images in the email to show. ### Actual Behavior The Pocket ID logo image is broken. Checking the source code shows the following (only the `<body>` tag is included): ```html <body> <div class=3D"container"> =20 <div class=3D"header"> <div class=3D"logo"> <img src=3D"https://id.example.com/api/application-configura= tion/logo" alt=3D"Pocket ID"/> <h1>Pocket ID</h1> </div> <div class=3D"warning">Warning</div> </div> <div class=3D"content"> <h2>New Sign-In Detected</h2> <div class=3D"grid"> =20 <div> <p class=3D"label">Approximate Location</p> <p>LAN/Docker/k8s, Internal Network</p> </div> =20 <div> <p class=3D"label">IP Address</p> <p>192.168.1.11</p> </div> <div> <p class=3D"label">Device</p> <p>Chrome on Linux x86_64</p> </div> <div> <p class=3D"label">Sign-In Time</p> <p>2025-02-14 12:02:02 UTC</p> </div> </div> <p class=3D"message"> This sign-in was detected from a new device or location. If you= recognize this activity, you can safely ignore this message. If not, please review your account = and security settings. </p> </div> </div> </body> ``` The email client shows: ```richtext Pocket ID Warning New Sign-In Detected Approximate Location LAN/Docker/k8s, Internal Network IP Address 192.168.1.11 Device Chrome on Linux x86_64 Sign-In Time 2025-02-14 12:02:02 UTC This sign-in was detected from a new device or location. If you recognize this activity, you can safely ignore this message. If not, please review your account and security settings. ``` So, some of the rubbish in the HTML source doesn't show in the email client, but the image reference is broken nonetheless. If I manually go to https://id.example.com/api/application-configuration/logo, it works. Is this an issue with Pocket ID or the email client? Thanks. ### Version and Environment 0.32.0 ### Log Output _No response_
OVERLORD added the bug label 2025-10-09 16:41:50 +03:00
Author
Owner

@EweSparky commented on GitHub:

@stonith404 yeah, I'm using Fastmail. I raised this with them and apparently it's because they proxy all images. Because my Pocket ID instance isn't accessible remotely, the images won't load in the Fastmail web/mobile apps (but do in third party apps, which I didn't think to test).

@EweSparky commented on GitHub: @stonith404 yeah, I'm using Fastmail. I raised this with them and apparently it's because they proxy all images. Because my Pocket ID instance isn't accessible remotely, the images won't load in the Fastmail web/mobile apps (but do in third party apps, which I didn't think to test).
Author
Owner

@stonith404 commented on GitHub:

This is the same issue as #93 you're probably using Fastmail, right? You're email client doesn't parse the email content correctly. The email content is encoded with "Quoted Printable".

The image reference isn't broken, it's just encoded. You can try to paste

<img src=3D"https://id.elias.li/api/application-configuration/l=
ogo" alt=3D"Pocket ID"/>

into this decoder and you will see that it decodes correctly.

I recommend you to report this issue to your email client.

@stonith404 commented on GitHub: This is the same issue as #93 you're probably using Fastmail, right? You're email client doesn't parse the email content correctly. The email content is encoded with "Quoted Printable". The image reference isn't broken, it's just encoded. You can try to paste ``` <img src=3D"https://id.elias.li/api/application-configuration/l= ogo" alt=3D"Pocket ID"/> ``` into [this decoder](https://www.webatic.com/quoted-printable-convertor) and you will see that it decodes correctly. I recommend you to report this issue to your email client.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#359