-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add sanitization #16
base: master
Are you sure you want to change the base?
Add sanitization #16
Conversation
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.
Had a few suggestions and questions. But ya, that's a whole lot code to review so good job IMO!
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.
Added the suggested changes from @mnelson4
@mnelson4 thanks! Yes, it a lot of code. I added all of your suggestions. It looks like @Pebblo has a question on one your suggestions here: #16 (comment) |
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.
These look good, but I did notice one typo
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.
No must-haves, I did have some suggestions though
$staff_meta['phone'] = sanitize_text_field($_REQUEST['phone']); | ||
$staff_meta['twitter'] = sanitize_text_field($_REQUEST['twitter']); | ||
$staff_meta['image'] = sanitize_text_field($_REQUEST['image']); | ||
$staff_meta['website'] = sanitize_text_field($_REQUEST['website']); |
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.
is this a url? if so esc_url_raw()
would be better
$staff_meta['website'] = $_REQUEST['website']; | ||
$staff_meta['phone'] = sanitize_text_field($_REQUEST['phone']); | ||
$staff_meta['twitter'] = sanitize_text_field($_REQUEST['twitter']); | ||
$staff_meta['image'] = sanitize_text_field($_REQUEST['image']); |
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.
is this a url too? if so esc_url_raw()
would be better
$staff_meta['image'] = sanitize_text_field($_REQUEST['image']); | ||
$staff_meta['website'] = sanitize_text_field($_REQUEST['website']); |
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.
could use esc_url_raw()
again
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.
Josh pointed out a significant issue that needs addressing (I basically missed it)
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.
Ah I see that issue has since been addressed!
Adds sanitization throughout the plugin.