[wp-trac] [WordPress Trac] #41443: Update /wp-admin/network/site-new.php to use wpmu_validate_blog_signup()

WordPress Trac noreply at wordpress.org
Mon Sep 25 18:02:12 UTC 2017


#41443: Update /wp-admin/network/site-new.php to use wpmu_validate_blog_signup()
--------------------------------+------------------------------
 Reporter:  neversettle         |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  4.8
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by flixos90):

 Thanks for the ticket @neversettle, and welcome to Trac!

 The reason that `wpmu_validate_blog_signup()` is not used there is that
 the function is supposed to handle new sites signed up by users. It is not
 intended to be used for network admins creating sites, which have all
 these permissions anyway.

 You're right that there is some overlap, such as subdirectory reserved
 names, but this logic has already been outsourced and is used in both
 areas through `get_subdirectory_reserved_names()`.
 `wpmu_validate_blog_signup()` has some extra restrictions, such as the
 `/[^a-z0-9]+/` regex, minimum site name length or check against a
 blacklist of illegal names. However I consider this difference intended,
 since admins should not need these restrictions.

 Let's discuss this a bit and think about whether it makes sense to enforce
 some of these restrictions to network admins creating new sites as well.

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


More information about the wp-trac mailing list