Changeset 14449
- Timestamp:
- 05/09/2025 10:07:55 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/functions.php
r14335 r14449 466 466 467 467 $from = 'wordpress.org'; 468 // Make sure value is a string since it is compared next. 468 469 if ( $redirect_to ) { 469 $from = $redirect_to;470 $from = sanitize_text_field( $redirect_to ); 470 471 } elseif ( !empty( $_REQUEST['from'] ) ) { 471 $from = $_REQUEST['from'];472 $from = sanitize_text_field( $_REQUEST['from'] ); 472 473 } elseif ( !empty( $_REQUEST['redirect_to'] ) ) { 473 $from = $_REQUEST['redirect_to'];474 $from = sanitize_text_field( $_REQUEST['redirect_to'] ); 474 475 } 475 476 … … 569 570 } 570 571 571 $came_from = $_REQUEST['redirect_to'] ?? ( $_SERVER['HTTP_REFERER'] ?? '' ); 572 // Make sure value is a string, since setcookie requires it to be. 573 $came_from = sanitize_text_field( $_REQUEST['redirect_to'] ?? ( $_SERVER['HTTP_REFERER'] ?? '' ) ); 572 574 if ( ! $came_from ) { 573 575 return;
Note: See TracChangeset
for help on using the changeset viewer.