
|
If you were logged in you would be able to see more operations.
|
Google issue summary
|
|
|
|
Issue Links:
|
Dependency
|
|
|
|
This issue is dependecy of:
|
|
ZF-881
Zend_Validate_Hostname - UTF-8 hostnames valid?
|
|
|
|
|
Duplicate
|
|
|
|
This issue is duplicated by:
|
|
ZF-115
Zend_Filter::isHostname not allow "d.hatena.ne.jp" (TRAC#130)
|
|
|
|
|
|
|
Zend_Filter::isHostname returns false,
When it called with a hostname that has one character part.
ex) "d.hatena.ne.jp", "a.hatena.ne.jp"
The reason is following regular expression code.
// check input against domain name schema
- $status = @preg_match('/^(?:[^\W_](?:[^\W_]|-){0,61}[^\W_]\.)+[a-zA-Z]{2,6}\.?$/', $value);
I changed like this, that returns true by calling with a hostname with one character part.
// check input against domain name schema
+ $status = @preg_match('/^(?:[^\W_]((?:[^\W_]|-){0,61}[^\W_])?\.)+[a-zA-Z]{2,6}\.?$/', $value);
But I don't know it's valid for RFCs about URI.
I think this fix is not so good.
|
|
Description
|
Zend_Filter::isHostname returns false,
When it called with a hostname that has one character part.
ex) "d.hatena.ne.jp", "a.hatena.ne.jp"
The reason is following regular expression code.
// check input against domain name schema
- $status = @preg_match('/^(?:[^\W_](?:[^\W_]|-){0,61}[^\W_]\.)+[a-zA-Z]{2,6}\.?$/', $value);
I changed like this, that returns true by calling with a hostname with one character part.
// check input against domain name schema
+ $status = @preg_match('/^(?:[^\W_]((?:[^\W_]|-){0,61}[^\W_])?\.)+[a-zA-Z]{2,6}\.?$/', $value);
But I don't know it's valid for RFCs about URI.
I think this fix is not so good. |
Show » |
|