Make WordPress Core

Opened 16 months ago

Last modified 16 months ago

#58668 new defect (bug)

wrong "domain" returned by wpmu_validate_blog_signup when using on subsite in subdomain multisite

Reported by: maniu's profile maniu Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.0
Component: General Keywords: has-patch
Focuses: multisite Cc:

Description

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.

Change History (1)

This ticket was mentioned in PR #4755 on WordPress/wordpress-develop by @maniu.


16 months ago
#1

  • Keywords has-patch added

Changes wpmu_validate_blog_signup so it uses $domain from $current_network instead of global $domain

Trac ticket: https://core.trac.wordpress.org/ticket/58668

Note: See TracTickets for help on using tickets.