Make WordPress Core


Ignore:
Timestamp:
01/27/2025 02:39:18 PM (10 months ago)
Author:
johnbillion
Message:

Security: Enable the referrer policy header on the login screen.

This sets the same referrer policy of strict-origin-when-cross-origin that's used in the admin area to prevent a referrer being sent to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within the URL.

The header can be disabled if necessary by removing the wp_admin_headers action from the login_init hook.

Props kkmuffme, sagarlakhani, albatross10

Fixes #62273
See #42036

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r59688 r59712  
    390390add_action( 'login_footer', 'wp_print_footer_scripts', 20 );
    391391add_action( 'login_init', 'send_frame_options_header', 10, 0 );
     392add_action( 'login_init', 'wp_admin_headers' );
    392393
    393394// Feed generator tags.
Note: See TracChangeset for help on using the changeset viewer.