updated plugin WP-WebAuthn
version 1.3.4
This commit is contained in:
@ -15,7 +15,7 @@ add_action('show_user_profile', 'wwa_user_profile_fields');
|
||||
|
||||
// Save setting to profile page
|
||||
function wwa_save_user_profile_fields($user_id){
|
||||
if(empty($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'update-user_'.$user_id)){
|
||||
if(empty($_POST['_wpnonce']) || !wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['_wpnonce'])), 'update-user_'.$user_id)){
|
||||
return;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ function wwa_save_user_profile_fields($user_id){
|
||||
|
||||
if(!isset($_POST['webauthn_only'])){
|
||||
update_user_meta($user_id, 'webauthn_only', 'false');
|
||||
}else if(sanitize_text_field($_POST['webauthn_only']) === 'true'){
|
||||
}elseif(sanitize_text_field(wp_unslash($_POST['webauthn_only'])) === 'true'){
|
||||
update_user_meta($user_id, 'webauthn_only', 'true');
|
||||
}else{
|
||||
update_user_meta($user_id, 'webauthn_only', 'false');
|
||||
|
Reference in New Issue
Block a user