Security with HTTP headers (Content-Security-Policy, XSS etc) #479
Unanswered
benjaoming
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Honestly, the moment an external piece of JS is injected, nothing is safe, not just localStorage.
There's no account-related API keys on Phanpy. The Mastodon API requires access tokens which will only work per-instance. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all 👋
Thanks for an amazing project 😍
I'm wondering about the following: Let's say that there is a security hole in phanpy and it's possible to sneak in a piece of JavaScript from another site. A so-called XSS vulnerability. In general, these can leave the localStorage open to attackers.
I suppose that this can leak access tokens to all logged in instances.
Would it be possible to add some protection against such attacks by disallowing specific things?
I'm thinking about HTTP headers such as the ones in this example here: https://gist.github.com/ambroisemaupate/bce4b760405558f358ae
(better examples may be found)
Does anyone have a working setup that restricts this? Or any other hints for defining one?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions