[wp-trac] [WordPress Trac] #64560: Function get_stylesheet_directory_uri() can expose server path when using a theme directory outside the document root

WordPress Trac noreply at wordpress.org
Thu Jan 29 23:14:56 UTC 2026


#64560: Function get_stylesheet_directory_uri() can expose server path when using a
theme directory outside the document root
--------------------------+------------------------------
 Reporter:  emrl          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by emrl):

 Thank you. We have a must-use plugin that calls `register_theme_directory`
 like this basically.

 {{{#!php
 <?php

 if (!defined('WP_DEFAULT_THEME')) {
     // Document root is `/home/user/app/public`
     register_theme_directory('/home/user/app');
 }
 }}}

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


More information about the wp-trac mailing list