[wp-trac] [WordPress Trac] #60659: get_subdirectory_reserved_name bypass on mutlisite

WordPress Trac noreply at wordpress.org
Thu Feb 29 12:07:13 UTC 2024


#60659: get_subdirectory_reserved_name bypass on mutlisite
--------------------------------+-----------------------------
 Reporter:  knightrider123      |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  6.4.3
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 By default on Multisite installation, you cannot have
 subsite(subdirectory) with name /blog/ due to:
 https://developer.wordpress.org/reference/functions/get_subdirectory_reserved_names/
 as this tigger an error when you try to create such subsite:

 {{{
 The following words are reserved for use by WordPress functions and cannot
 be used as site names: page, comments, blog, files, feed, wp-admin, wp-
 content, wp-includes, wp-json, embed
 }}}
 But you can bypass that by creating subsite /aaa/ and edit name later on
 in network. I wonder is that a bug, and if so will it cause any issues
 using such subsites slug?

 The only one I have found so far is that if on main site you will have
 /blog/ page slug, after re-save slug will get the number at the end.

 Also, if you can bypass that, maybe it should be removed from reserved
 list?

 Apart from /blog/ slug I was able to replicate that for /comments/ using
 same bypass.

 I could not find any information in that matter.

 Thank you

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60659>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list