#15554 closed defect (bug) (fixed)
Sites with IDN domains can't be created
Reported by: | SergeyBiryukov | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.0.1 |
Component: | Network Admin | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
When I try to create a new site with any valid IDN domain in Multisite, I get “Missing or invalid site address” error.
I found the line in ms-edit.php
from r13630 which causes the problem:
if ( ! preg_match( '/(--)/', $blog['domain'] ) && preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) ) $domain = strtolower( $blog['domain'] );
What is the purpose of the first check? When I remove it and leave only the second one, the site is added correctly.
Also, is it possible convert a domain name to Punycode automatically from UTF-8?
Attachments (2)
Change History (20)
#3
@
14 years ago
- Milestone changed from Awaiting Review to Future Release
The -- check may be to prevent IDNs, since there's probably some bugs elsewhere. If that's the case, I agree it's not a good long term solution :) Maybe wpmuguru can chime in and provide more info.
Yes, punycode conversion is possible in PHP.
Natively: http://us.php.net/manual/en/ref.intl.idn.php (PHP 5.3+ or PECL)
#4
@
14 years ago
Prior to writing that patch, I did some research on domain name rules. The resource I found indicated that two - were not allowed together. That might have been out of date & I didn't catch it.
There should be no harm from a WP perspective to remove that -- check. We should also test the blog lookup and verify that it works ok with two or more - together. I'll do a sanity check on that and update the ticket.
#5
@
14 years ago
I didn't do an exhaustive amount of testing, but I didn't have any issues with either a subdomain or subfolder install and a blogname with -- in the middle of it.
rewrites worked
permalinks worked
admin area was fine
Early 3.2?
#13
@
13 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [18473]:
#14
@
13 years ago
http://codex.wordpress.org/Version_3.3#Install_Process "Allow creating sites with IDN domains"
this is not true. i cannot register a site (from fresh firefox profile). probably ms-edit.php is not used in user registration by themself.
should be new bug opened or this reopened? (somebody open/reopen yourself or say to me to open/reopen)
#15
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
i will attach differences that i made to make my блогы.рф working , when it was 3.0.4 . i have reinstalled os and wordpress, and idn in the site do not work now.
i reopen this bug (or try, selecting it), because heading and first post and all thread are good for that.
#16
@
13 years ago
- Keywords 3.3-early removed
- Resolution set to fixed
- Status changed from reopened to closed
Since this ticket was marked as fixed for a shipped milestone, please open a new ticket and reference this one.
Related: #11777