Opened 14 years ago
Closed 3 years ago
#17397 closed defect (bug) (maybelater)
Inconsistency in allowed site addresses
Reported by: | johnbillion | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | needs-patch dev-feedback |
Focuses: | multisite | Cc: |
Description
The rules for allowed characters in a site address differ between when you add a new site and when you edit an existing site.
Steps to reproduce:
- Go to Network Admin -> Sites -> Add New
- Enter
foo.bar
as the site address and hit save. The address will be rejected as containing invalid characters. - Edit an existing site instead, and enter
foo.bar.yourdomain.com
as the domain. The address will be accepted just fine.
Having written that out, maybe this isn't a valid bug because when adding a site you're entering the site address, but when you're editing a site you're editing the complete domain name. Hmm. I'll open it anyway and see what people think.
My core issue is that I'd like to be able to add sites that use fourth-level subdomains (eg foo.bar.baz.com
when the main site is at baz.com
). Currently I have to enter a different site address then go in and edit it to the desired domain.
Attachments (1)
Change History (21)
#2
follow-up:
↓ 4
@
13 years ago
Is it actually covered by that ticket? Overhaul of the signup process sounds like a different thing to me.
#4
in reply to:
↑ 2
@
13 years ago
Replying to SergeyBiryukov:
Is it actually covered by that ticket? Overhaul of the signup process sounds like a different thing to me.
Whoops. I read this comment which covers username restrictions while I was thinking about site name restrictions.
#5
@
12 years ago
- Keywords needs-patch added; 2nd-opinion removed
There is a legitimate use case for Super admins adding subdomains with one or more '.' as long as they are not two together.
#6
@
11 years ago
Do we want non super admins doing this, though? Yes, it's a pain to do it the way we have to (i.e. add foo1bar and change it to foo.bar) but is this a bad restriction? A super admin would (should) know if that's going to work as desired anyway.
Since the capes can do this, I'm leaning towards #wontfix or perhaps a better error 'That is an invalid name. Only superadmins can create sub-sub domains.'
(Possible dupe of #20019 - where in I think nacin's suggestion of making this a filter would be aces)
#7
@
11 years ago
Ticket #20019 is regarding frontend signups. This ticket is regarding super admins creating/editing sites. The same rules should apply to super admins when creating/editing sites. There are no restrictions on site addresses in the editing process, but there are during creation. My patch removes the restrictions on domain during site creation.
#12
@
11 years ago
- Severity changed from minor to normal
Right now, updating a site through site-info.php
does only strtolower()
on the domain before sending it to be updated.
Adding a site through site-new.php
restricts it to [a-zA-Z0-9-]
. We could cheat a bit and make that [a-zA-Z0-9-.]
for now, just to allow for .
to be entered on new sites, though we'd still be ignoring a bunch of valid characters for domains.
I think @tlovett1's 17397.diff is likely the right answer here until something like #17948 is used to revamp the experience entirely. It applies cleanly on trunk at the moment.
#13
@
11 years ago
- Milestone changed from 3.7 to 3.8
Moving to 3.8 for discussion. We need to decide whether this needs to align with #20019.
#16
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from Future Release to 4.1
On a revisit... While #17948 is a big effort, it seems more oriented around our Open Network concept. Adding sites through site-new.php
is very much a Closed Network operation, IMO.
I'm not sure that we need to change the default validation yet, as allowing multilevel subdomains and paths without being setup for it may not be desirable.
I do think we can at least add a filter in 4.1 to help extend validation. It may even be worth starting to think about validate_site_sub_domain()
and validate_site_path()
functions that can be used here and in other areas like site-info.php
.
Related #19724, #15831, #20019, #13387, and #18777 (effectively the sub-directory sibling of this ticket)
#17
@
10 years ago
- Milestone changed from 4.1 to Future Release
After our multisite chat on Tuesday, this needs a bit more thought (as per the above).
Gonna close this as a dupe of #17948 where this issue is covered and being worked on by wpdavis.