Make WordPress Core

Ticket #44089: 44089.diff

File 44089.diff, 978 bytes (added by ianbelanger, 8 years ago)

Removes Password Protected Page cookie on user logout

  • src/wp-login.php

     
    543543                }
    544544
    545545                /**
     546                 * Removes wp-postpass_ cookie on user logout
     547                 *
     548                 * @since 4.9.7
     549                 *
     550                 */
     551                if ( isset( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] ) ) {
     552
     553                        unset( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
     554                        setcookie( 'wp-postpass_' . COOKIEHASH, '', time() - ( 15 * 60 ) );
     555
     556                }
     557
     558                /**
    546559                 * Filters the log out redirect URL.
    547560                 *
    548561                 * @since 4.2.0
  • tests/phpunit/includes/testcase-ajax.php

     
    119119                'delete-theme',
    120120                'install-theme',
    121121                'get-post-thumbnail-html',
     122                'wp-privacy-export-personal-data',
    122123        );
    123124
    124125        public static function setUpBeforeClass() {