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

Bypass XSS Protection in PHP #571

Open
lycoxz opened this issue Mar 22, 2024 · 6 comments
Open

Bypass XSS Protection in PHP #571

lycoxz opened this issue Mar 22, 2024 · 6 comments

Comments

@lycoxz
Copy link

lycoxz commented Mar 22, 2024

Please How to Bypass XSS Protection in PHP


Does this affect you too? Click below and add a 👍 to vote for this and help decide where HTTP Toolkit goes next, or go vote on the other most popular ideas so far.

@pimterry pimterry changed the title I am mmber Bypass XSS Protection in PHP Mar 22, 2024
@pimterry
Copy link
Member

Hi @lycoxz. That's a complicated question and there's no easy answers. It depends on the specific case you're testing.

The most common case for XSS protection is that response headers (e.g. content-security policy) for the page are being used to restrict the scripts running within the given site. You can disable these for testing with HTTP Toolkit (e.g. with a 'Transform' mock rule that updates the "content-security-policy" header to "") but note that HTTP Toolkit can only help you with local testing like this - it doesn't affect the XSS protection on the real site at all.

@lycoxz
Copy link
Author

lycoxz commented Mar 22, 2024 via email

@pimterry
Copy link
Member

Content security policy is a response header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy. The server sends it to the web browser, and it defines some rules about what scripts can run in the page and what they can do. That makes XSS much more difficult, since it blocks loading scripts or sending data elsewhere (among other things).

In terms of PHP & curl I'm not really sure what you're asking. It's a response header, not a request header.

I'm happy to give some pointers, but I think this sounds like a more general problem than an HTTP Toolkit question, so I can't handle this for you, and to share any more info I think I'll need a lot more context - it would be helpful if you could explain in much more detail what you're trying to do and what you've tried so far.

@lycoxz
Copy link
Author

lycoxz commented Mar 22, 2024 via email

@lycoxz
Copy link
Author

lycoxz commented Mar 22, 2024 via email

@pimterry
Copy link
Member

Curl isn't used in HTTP Toolkit. This question doesn't really make any sense I'm afraid.

From your description, it doesn't sound like you're talking about XSS at all - XSS only exists in browsers, and it's not something you can control with different types of requests.

Can you explain the full context of what you're trying to do, what you're currently doing (in detail) and what's currently happening? It would be useful if you could also share all the relevant code you're running and screenshots of the issues you're seeing.

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

No branches or pull requests

2 participants