[wp-trac] [WordPress Trac] #60652: font_dir filter enters an infinite loop if wp_get_upload_dir() is used in the filter callback

WordPress Trac noreply at wordpress.org
Thu Feb 29 10:15:36 UTC 2024


#60652: font_dir filter enters an infinite loop if wp_get_upload_dir() is used in
the filter callback
--------------------------+------------------------------
 Reporter:  mmaattiiaass  |       Owner:  youknowriad
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by youknowriad):

 * owner:  (none) => youknowriad
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"57740" 57740]:
 {{{
 #!CommitTicketReference repository="" revision="57740"
 Editor: Prevent infinite loops when filtering the font library folder.

 Changing the font library is something we expect hosts to perform.
 It's important that we make this filter as seemless as possible.
 This commit prevents a potential infinite loop caused by calling
 wp_get_upload_dir() within the font_dir filter.

 Props mmaattiiaass, ironprogrammer, costdev, swissspidy.
 Fixes #60652.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60652#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list