This repository was archived by the owner on Sep 27, 2022. It is now read-only.
Early sanitization, late escaping - #109
Open
peterwilsoncc wants to merge 7 commits into
Open
Conversation
Owner
|
I'm not going to accept this pull request because there's a lot of stuff I'm seeing that's simply unnecessary. Mostly, this is when something's already been sanitized or escaped at a different point in the flow. Or, times where the code is checking against a whitelist of accepted values. However, I am going to keep this open because there's some useful items in there that I'd like to use in the next version. |
Author
|
That's fair enough. I wanted to get in the hardening in early/late and leave you the gift of removing the other items the flow :) Core has been caught out by missing the sanitize early, escape late rule in a few recent releases, so it's something I keep in mind these days. |
justintadlock
added a commit
that referenced
this pull request
Jun 26, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've made some minor changes to escaping and sanitization for use on a client site. At the moment, they're defensive coding rather than to protect against any flaws.
The changes I've made are: