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

Fix for XSS bug #84

Merged
merged 4 commits into from Apr 22, 2016
Merged

Fix for XSS bug #84

merged 4 commits into from Apr 22, 2016

Conversation

roddux
Copy link
Contributor

@roddux roddux commented Apr 22, 2016

Fixes #82

Changes proposed in this pull request:
Sanitation (via htmlspecialchars()) of JSON data returned by api.php, fixing an XSS bug.

Pointed at the correct branch this time.

Pointed at the correct branch this time.
@PromoFaux
Copy link
Member

Thanks for this, will check it out on my lunch break!

`json_encode` needs to call the result of `htmlspecialchars`, not visa versa!
`htmlspecialchars` does not work on arrays.
This is why testing is important :^)
I actually tested this one! it works.
My apologies for the previous, non-working commits-- I had to refresh my knowledge of PHP.
@PromoFaux
Copy link
Member

Tested. Approved.

Thanks for the submission 👍

@PromoFaux PromoFaux merged commit cb57c0c into pi-hole:devel Apr 22, 2016
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.

None yet

2 participants