Skip to content

Commit

Permalink
Remove call to sanitize_text_field (#239)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonny Harris <[email protected]>
  • Loading branch information
spacedmonkey and jonnynews authored Jan 25, 2024
1 parent eb65e21 commit eb388a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function rest_oauth1_profile_save( $user_id ) {
return;
}

$key = sanitize_text_field( wp_unslash( $_POST['rest_oauth1_revoke'] ) );
$key = wp_unslash( $_POST['rest_oauth1_revoke'] );

$authenticator = new WP_REST_OAuth1();

Expand Down
2 changes: 1 addition & 1 deletion lib/class-wp-rest-oauth1.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function parse_header( $header ) {
*/
public function get_authorization_header() {
if ( ! empty( $_SERVER['HTTP_AUTHORIZATION'] ) ) {
return sanitize_text_field( wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] ) );
return wp_unslash( $_SERVER['HTTP_AUTHORIZATION'] );
}

if ( function_exists( 'getallheaders' ) ) {
Expand Down

0 comments on commit eb388a2

Please sign in to comment.