[wp-trac] [WordPress Trac] #58668: wrong "domain" returned by wpmu_validate_blog_signup when using on subsite in subdomain multisite

WordPress Trac noreply at wordpress.org
Thu Jun 29 06:25:06 UTC 2023


#58668: wrong "domain" returned by wpmu_validate_blog_signup when using on subsite
in subdomain multisite
--------------------------+-----------------------------
 Reporter:  maniu         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.0
 Severity:  minor         |   Keywords:
  Focuses:  multisite     |
--------------------------+-----------------------------
 `wpmu_validate_blog_signup` function relies on global `$domain` which will
 give wrong results when its triggered on subsite of subdomain multisite.
 In cases like this, `$domain` will be set to current subsite, which will
 lead to unexpected value of "domain" element in returned array.

 Triggering the function on subsite will lead to "domain" element having
 value like "newsite.currentsubsite.network" instead of "newsite.network".

 To fix this, `$domain` should be set based on `$current_network->domain`
 instead of global `$domain`.

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


More information about the wp-trac mailing list