Skip to content

Commit

Permalink
General: Validate host on "Are you sure?" screen.
Browse files Browse the repository at this point in the history
Props voldemortensen, xknown, peterwiloncc.


git-svn-id: https://develop.svn.wordpress.org/trunk@54522 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
audrasjb committed Oct 17, 2022
1 parent abf236f commit 506eee1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wp-includes/functions.php
Expand Up @@ -3584,10 +3584,12 @@ function wp_nonce_ays( $action ) {
} else {
$html = __( 'The link you followed has expired.' );
if ( wp_get_referer() ) {
$wp_http_referer = remove_query_arg( 'updated', wp_get_referer() );
$wp_http_referer = wp_validate_redirect( esc_url_raw( $wp_http_referer ) );
$html .= '</p><p>';
$html .= sprintf(
'<a href="%s">%s</a>',
esc_url( remove_query_arg( 'updated', wp_get_referer() ) ),
esc_url( $wp_http_referer ),
__( 'Please try again.' )
);
}
Expand Down

0 comments on commit 506eee1

Please sign in to comment.