[wp-trac] [WordPress Trac] #31620: get_raw_theme_root does not resolve custom theme folder when is the unique

WordPress Trac noreply at wordpress.org
Fri Jul 3 10:45:35 UTC 2015


#31620: get_raw_theme_root does not resolve custom theme folder when is the unique
-------------------------------------+------------------------------
 Reporter:  giuseppe.mazzapica       |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Themes                   |     Version:  trunk
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------

Comment (by giuseppe.mazzapica):

 @McGuive7 after a conversation with @toscho both of us are concerned about
 the use of `realpath`.

 Our concerns regard the implications related to symlinks that may break
 urls because `realpath` expand them. (lines #637 and #638 in your patch)

 Probably usage of `wp_normalize_path` is better because keeps the `strpos`
 check cross-OS compatible and avoid such problems, making this patch
 pretty a no-brainer.

 For symlinks-related edge cases, there's always the filter
 `'theme_root_uri'` that allows to change the generated url if it's wrong
 for any reason.

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


More information about the wp-trac mailing list