[wp-trac] [WordPress Trac] #44575: Network administrators are allowed to register sites with hyphens, but wpmu_validate_blog_signup disallows hyphens

WordPress Trac noreply at wordpress.org
Thu Jul 12 13:52:32 UTC 2018


#44575: Network administrators are allowed to register sites with hyphens, but
wpmu_validate_blog_signup disallows hyphens
--------------------------------+-----------------------------
 Reporter:  greatislander       |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  4.9.7
 Severity:  normal              |   Keywords:  needs-patch
  Focuses:  multisite           |
--------------------------------+-----------------------------
 As a network administrator, I can register a site with a hyphen in the URL
 from `/wp-admin/network/site-new.php` (see here:
 https://github.com/WordPress/WordPress/blob/master/wp-admin/network/site-
 new.php#L237). The guide text says:

 > Only lowercase letters (a-z), numbers, and hyphens are allowed.

 However, as a user on `wp-signup.php`, I can only use lowercase letters
 and numbers and this is enforced by `wpmu_validate_blog_signup()` (see
 here: https://github.com/WordPress/WordPress/blob/master/wp-admin/network
 /site-new.php#L237). The error message says:

 > Site names can only contain lowercase letters (a-z) and numbers.

 Is there a reason for this discrepancy? As a network admin, it means that
 I have different URL options depending on where I register a site, which
 is counterintuitive. Ideally the same URL options would be available for
 site registration wherever it happens.

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


More information about the wp-trac mailing list