mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Best practice, use wp_safe_redirect() when dealing with referrers. Props nacin.
git-svn-id: https://develop.svn.wordpress.org/trunk@19579 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -30,7 +30,7 @@ if ( $doaction ) {
|
||||
} elseif ( isset( $_REQUEST['ids'] ) ) {
|
||||
$comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
|
||||
} elseif ( wp_get_referer() ) {
|
||||
wp_redirect( wp_get_referer() );
|
||||
wp_safe_redirect( wp_get_referer() );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ if ( $doaction ) {
|
||||
if ( $trashed || $spammed )
|
||||
$redirect_to = add_query_arg( 'ids', join( ',', $comment_ids ), $redirect_to );
|
||||
|
||||
wp_redirect( $redirect_to );
|
||||
wp_safe_redirect( $redirect_to );
|
||||
exit;
|
||||
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) {
|
||||
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );
|
||||
|
||||
Reference in New Issue
Block a user