WordPress.org

Make WordPress Core

Ticket #19856: 19856-2.patch

File 19856-2.patch, 455 bytes (added by bpetty, 2 years ago)

use get_site_url() in wp_get_referer() checks

  • wp-includes/functions.php

     
    12611261        else if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) 
    12621262                $ref = $_SERVER['HTTP_REFERER']; 
    12631263 
    1264         if ( $ref && $ref !== $_SERVER['REQUEST_URI'] ) 
     1264        if ( $ref && $ref !== get_site_url() . $_SERVER['REQUEST_URI'] ) 
    12651265                return $ref; 
    12661266        return false; 
    12671267}