Make WordPress Core

Opened 7 weeks ago

#60659 new defect (bug)

get_subdirectory_reserved_name bypass on mutlisite

Reported by: knightrider123's profile knightrider123 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4.3
Component: Networks and Sites Keywords:
Focuses: multisite Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.