-
Notifications
You must be signed in to change notification settings - Fork 44
Labels
Milestone
Description
If, for example, the sequence %B2 exists somewhere in the site_token, sanitize_text_field( $_POST['site_token'] ) will strip it out breaking the site_token.
In class-syndication-wp-rest-client.php:
update_post_meta( $site_ID, 'syn_site_token', push_syndicate_encrypt( sanitize_text_field( $_POST['site_token'] ) ) );
Not sure the best way to sanitize this field or if it even needs to be sanitized, but my current workaround:
function syndication_sanitize( $filtered, $str ) {
if ( is_admin() && ! empty( $_POST ) && 'syn_site' === get_post_type() ) {
return $str;
} else {
return $filtered;
}
}
add_filter( 'sanitize_text_field', 'syndication_sanitize', 10, 2 );
Reactions are currently unavailable