Escaping $_POST
Implementing feedback from the WordPress Plugin Review Team, because I was sloppy. 🤦♂️
This commit is contained in:
parent
d157b1fb26
commit
c1df116b37
@ -67,7 +67,7 @@ function biscotti_login_cookie_expiration_form_fields_update( $user_id )
|
|||||||
if (! current_user_can('edit_user', $user_id) ) {
|
if (! current_user_can('edit_user', $user_id) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
update_user_meta($user_id, 'biscotti_login_cookie_expiration', $_POST['biscotti_login_cookie_expiration']);
|
update_user_meta($user_id, 'biscotti_login_cookie_expiration', esc_attr($_POST['biscotti_login_cookie_expiration']));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the chosen login cookie expiration date when the user profile is updated.
|
// Save the chosen login cookie expiration date when the user profile is updated.
|
||||||
@ -96,4 +96,4 @@ function biscotti_login_cookie_expiration_set_auth_cookie( $auth_cookie_data )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Modify the expiration of the logged in user cookie when a user logs into the site.
|
// Modify the expiration of the logged in user cookie when a user logs into the site.
|
||||||
add_filter('auth_cookie_expiration', 'biscotti_login_cookie_expiration_set_auth_cookie', 10, 3);
|
add_filter('auth_cookie_expiration', 'biscotti_login_cookie_expiration_set_auth_cookie', 10, 3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user