Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Cloudflare from treating handles as emails #572

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ewpratten
Copy link

A display issue occurs when a Takahē instance is hosted behind a Cloudflare proxy and Cloudflare's Email Address Obfuscation feature is enabled.

Due to the format of handles, Cloudflare treats them as email addresses, and will cause them to display as @[email protected]. See below for an example:

Screenshot from 2023-05-07 12-33-31

Luckily, Cloudflare provides a way to force-disable false positives.

This PR wraps every instance of @{{identity.handle}} I could find with the "magic comments" to force-disable email protection, and stop Cloudflare from hiding handles.

@karthikb351
Copy link
Contributor

karthikb351 commented May 7, 2023

@ewpratten for me this behaviour was only happening on django's hx-swap/hx-get action (like clicking on the refresh button on the homepage), not on the initial page load - which made me think it's got to do with the fact that's it's a non-json AJAX. Were you seeing this on the first page load as well?

@ewpratten
Copy link
Author

I see this on every page load, but only on the home timeline

@andrewgodwin
Copy link
Member

Surely there must be some way to turn this off on the Cloudflare side? I really am not a fan of changing HTML output just to satisfy one commercial vendor.

@ewpratten
Copy link
Author

ewpratten commented May 8, 2023 via email

@andrewgodwin
Copy link
Member

I'm going to icebox this for a while as I think about it - as far as I'm concerned this is really a Cloudflare bug, so I'm not in a huge rush to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants