-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Flag any non-validated/sanitized super global input vars #101
Conversation
Closes #72 Switch list of sanitizing/autoescaping function to a static var to be used by other classes
return; | ||
} | ||
|
||
if (in_array($functionName, $this->sanitizingFunctions) === false) { | ||
if (in_array($functionName, self::$sanitizingFunctions) === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shadyvb just curious: why the switch from instance to static?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So i can use the list of functions in other classes, https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/101/files#diff-6693bc98032bf5043abf5d11967faf4aR104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of replicating the exact same list again.
empty( $_REQUEST['foo'] ) | ||
|| | ||
empty( $_POST['foo'] ) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shadyvb I added this use of empty()
which should be fine just like isset()
but it is not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, fix is on the way!
@shadyvb could you please merge |
…ress-Coding-Standards into issue/72 Conflicts: Sniffs/XSS/EscapeOutputSniff.php
Flag any non-validated/sanitized super global input vars
Fixes #72