Make WordPress Core

Ticket #31645: 31645.3.patch

File 31645.3.patch, 854 bytes (added by SergeyBiryukov, 10 years ago)
  • src/wp-admin/includes/class-wp-press-this.php

     
    344344
    345345                // HTTP 1.1 allows 8000 chars but the "de-facto" standard supported in all current browsers is 2048.
    346346                if ( strlen( $url ) > 2048 ) {
    347                         return ''; // Return empty rather than a trunacted/invalid URL
     347                        return ''; // Return empty rather than a truncated/invalid URL
    348348                }
    349349
    350                 // Does it look like an URL?
    351                 if ( ! preg_match( '/^([!#$&-;=?-\[\]_a-z~]|%[0-9a-fA-F]{2})+$/', $url ) ) {
     350                // Return empty if it does not look like an absolute URL
     351                if ( '/' === $url[0] || ! preg_match( '/^([!#$&-;=?-\[\]_a-z~]|%[0-9a-fA-F]{2})+$/', $url ) ) {
    352352                        return '';
    353353                }
    354354