[wp-trac] [WordPress Trac] #24824: get_attached_file() treats fully qualified URLs as relative

WordPress Trac noreply at wordpress.org
Tue Jul 23 17:35:23 UTC 2013


#24824: get_attached_file() treats fully qualified URLs as relative
----------------------------------+-----------------------------
 Reporter:  tobiaskochsonlinenet  |      Owner:
     Type:  defect (bug)          |     Status:  new
 Priority:  normal                |  Milestone:  Awaiting Review
Component:  Media                 |    Version:  trunk
 Severity:  normal                |   Keywords:  has-patch
----------------------------------+-----------------------------
 If you call the function get_attached_file() of wp-include/post.php with a
 fully qualified URL (like "http://www.example.com/file.ext") it will
 prepend the upload directory.

 Checking the file's URI for {{{://}}} would prevent this.

 {{{
 !preg_match('|^://|', $file)
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24824>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list