Plugin Directory

Changeset 2835252


Ignore:
Timestamp:
12/16/2022 08:18:59 PM (3 years ago)
Author:
infracontentools
Message:

Remove sanitize from password

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-contentools/trunk/includes/class-contentools-rest.php

    r2834661 r2835252  
    255255
    256256        $php_auth_user = sanitize_user($_SERVER['PHP_AUTH_USER']);
    257         $php_auth_pw = sanitize_text_field($_SERVER['PHP_AUTH_PW']);
    258257
    259258        if (!isset($_SERVER['PHP_AUTH_USER']) && (isset($_SERVER['HTTP_AUTHORIZATION']) || isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))) {
     
    271270            if (!empty($header)) {
    272271
    273                 list($php_auth_user, $php_auth_pw) = explode(':', base64_decode(substr($header, 6)));
     272                list($php_auth_user, $_SERVER['PHP_AUTH_PW']) = explode(':', base64_decode(substr($header, 6)));
    274273
    275274            }
     
    285284
    286285        $username = $php_auth_user;
    287         $password = $php_auth_pw;
     286        $password = $_SERVER['PHP_AUTH_PW'];
    288287
    289288        remove_filter('determine_current_user', array($this, 'determine_current_user'), 10);
Note: See TracChangeset for help on using the changeset viewer.