Make WordPress Core

Changeset 24641


Ignore:
Timestamp:
07/10/2013 01:35:30 PM (12 years ago)
Author:
nacin
Message:

In wp_http_validate_url(), only validate the protocol in lieu of esc_url_raw(). Ensure there is a host component to the URL. fixes #24663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r24480 r24641  
    340340 */
    341341function wp_http_validate_url( $url ) {
    342     $url = esc_url_raw( $url, array( 'http', 'https' ) );
     342    $url = wp_kses_bad_protocol( $url, array( 'http', 'https' ) );
    343343    if ( ! $url )
    344344        return false;
    345345
    346346    $parsed_url = @parse_url( $url );
    347     if ( ! $parsed_url )
     347    if ( ! $parsed_url || empty( $parsed_url['host'] ) )
    348348        return false;
    349349
Note: See TracChangeset for help on using the changeset viewer.