#22235 closed defect (bug) (maybelater)
Blog path included in base
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Multisite | Version: | 3.5 |
| Severity: | normal | Keywords: | close |
| Cc: |
Description
Previously: #19796
My config:
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
$base = '/core/';
define('DOMAIN_CURRENT_SITE', 'wp.dev');
define('PATH_CURRENT_SITE', '/core/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
When I go to Network Admin -> Sites, the list of blogs looks like this:
/core/ /core/foo/ /core/bar/
and then, if I go to edit /core/bar/, I can change /core/ to something else, making that particular blog inaccessible.
Attachments (1)
Change History (16)
- Owner MarkJaquith deleted
22235.diff is the start of a patch. It doesn't validate the base yet.
Looking at the additional logic in get_blogaddress_by_domain(), I get the impression that my patch will break something, but I'm not sure what.
comment:5
SergeyBiryukov — 7 months ago
Possibly related: #18242
Why
echo $protocol; echo esc_html( $site_url_no_http );
instead of
echo $protocol . esc_html( $site_url_no_http );
- Keywords has-patch close added; needs-patch removed
- Priority changed from high to normal
I'm not sure this is such a big deal anymore. I mean, you could just change the domain completely and MS won't stop you, even if you don't have domain mapping enabled.
Created a new ticket for combining the fields: #22383
comment:10
scribu — 7 months ago
- Keywords has-patch removed
comment:11
nacin — 7 months ago
Was this a regression? I was under the opinion that it was.
comment:12
follow-up:
↓ 13
scribu — 7 months ago
It would be a regression, if we did any validation before, like checking that the user didn't change the domain.
comment:13
in reply to:
↑ 12
;
follow-up:
↓ 15
nacin — 7 months ago
- Milestone changed from 3.5 to Future Release
Replying to scribu:
It would be a regression, if we did any validation before, like checking that the user didn't change the domain.
But we didn't... So this is not a regression and has been around since the merge, yes? If so, punting. Feel free to close as a duplicate of #22383 if you think they can merge.
comment:14
scribu — 7 months ago
- Milestone Future Release deleted
- Resolution set to maybelater
- Status changed from assigned to closed
Correct. Going to close as maybelater, in case we ever want to start adding comprehensive validation.

I think the most elegant way to go about this would be to combine the Path and Domain input fields into a single URL input and then use parse_url() to update the relevant bits.
And, if the new path doesn't start with $base, we can show an error message and refuse to save it.