Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Sanitize tabs #81

Open
seezee opened this issue Jul 1, 2019 · 3 comments
Open

Sanitize tabs #81

seezee opened this issue Jul 1, 2019 · 3 comments

Comments

@seezee
Copy link

seezee commented Jul 1, 2019

In order to pass PHPCS, I've changed the following lines in Class _Settings:

334:	$current_section = $_POST['tab'];
	$current_section = sanitize_text_field( wp_unslash( $_POST['tab'] ) );
337:	$current_section = $_GET['tab'];
	$current_section = sanitize_text_field( wp_unslash( $_GET['tab'] ) );
409:	$tab .= $_GET['tab'];
	$tab .= sanitize_text_field( wp_unslash( $_GET['tab'] ) );

These fields should never contain HTML anyway so this seems a good way to handle this unless there's some edge case I haven't thought of.

I would open a pull request, but I'm still learning how to use version control and haven't figured out how to do that yet :-(

@jonathanbossenger
Copy link
Collaborator

@seezee would you like me to record a screencast, on how to create a PR, might be a useful learning experience for you?

@seezee
Copy link
Author

seezee commented Jul 1, 2019 via email

@jonathanbossenger
Copy link
Collaborator

https://youtu.be/6044wDAIejo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants