This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Cleanup #119
Merged
Merged
Cleanup #119
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6169591
Cleanup: make caps checks more explicit/easier to see
azaozz 0fb247a
Pass window.wp_autoupdates as a parameter to the JS closure. Change …
pbiron 9694a66
Merge branch 'master' into fix/pre-merge-cleanup
azaozz c4ece2d
The nonce check should be first
azaozz a7abdcd
Various coding standards and consistency changes.
pbiron 0855266
Always be explicit with the enable/disable action.
pbiron a58a879
Sanitize $_GET['paged'] with absint().
pbiron f4f593e
Correct boolean logic error.
pbiron 18847cd
Fix typo in plugin bulk action keys.
pbiron 5e0359b
Remove unneeded array_unique() in plugin disable bulk actions handler.
pbiron 42639f1
Fix typo in selector for the manual theme update success handler.
pbiron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
I believe the sanitizing was at the request of @whyisjake . If he's OK with these no longer being sanitized, then rest looks good to me.
@azaozz I just pushed an additional commit with 2 other minor changes, so be sure to check those.
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.
Right. All strings coming from the user, (
$_GET
,$_POST
,$_REQUEST
, many from$_SERVER
, etc.) must be sanitized. However strings that must match a particular, limited example can be matched directly. In this case$_POST['state']
can only beenable
ordisable
, all other strings there are ignored. Then a direct match makes more sense as it's faster.Similarly when a number is expected, it would be enough to cast to
int
or dointval()
(with some limitations), instead of first sanitizing the string.