Skip to content
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

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Add sanitization #16

wants to merge 45 commits into from

Conversation

sethshoultes
Copy link
Contributor

Adds sanitization throughout the plugin.

Copy link

@mnelson4 mnelson4 left a 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!

includes/admin-reports/edit_attendee_record.php Outdated Show resolved Hide resolved
includes/admin-reports/edit_attendee_record.php Outdated Show resolved Hide resolved
includes/admin-reports/edit_attendee_record.php Outdated Show resolved Hide resolved
includes/admin-reports/edit_attendee_record.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Show resolved Hide resolved
includes/event-management/update_event.php Outdated Show resolved Hide resolved
includes/event-management/update_event.php Outdated Show resolved Hide resolved
Copy link
Contributor Author

@sethshoultes sethshoultes left a 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

includes/admin-reports/edit_attendee_record.php Outdated Show resolved Hide resolved
includes/admin-reports/enter_attendee_payments.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Outdated Show resolved Hide resolved
includes/event-management/insert_event.php Show resolved Hide resolved
includes/event-management/update_event.php Outdated Show resolved Hide resolved
includes/event-management/update_event.php Outdated Show resolved Hide resolved
@sethshoultes
Copy link
Contributor Author

@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)

Copy link

@mnelson4 mnelson4 left a 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

includes/admin-reports/enter_attendee_payments.php Outdated Show resolved Hide resolved
@joshfeck joshfeck modified the milestones: 3.1.37.16, 3.1.37.17 Nov 15, 2019
@joshfeck joshfeck modified the milestones: 3.1.37.17, 3.1.37.18 Nov 29, 2019
Copy link

@mnelson4 mnelson4 left a 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']);
Copy link

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']);
Copy link

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

Comment on lines 8 to 9
$staff_meta['image'] = sanitize_text_field($_REQUEST['image']);
$staff_meta['website'] = sanitize_text_field($_REQUEST['website']);
Copy link

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

includes/form-builder/groups/index.php Outdated Show resolved Hide resolved
includes/form-builder/index.php Outdated Show resolved Hide resolved
includes/functions/export.php Outdated Show resolved Hide resolved
Copy link

@mnelson4 mnelson4 left a 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)

Copy link

@mnelson4 mnelson4 left a 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!

@Pebblo Pebblo modified the milestones: 3.1.37.18, 3.1.37.19.p Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants