Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.0RC2
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Validate
-
Labels:None
Description
With a check on
$validatorHostname = new Zend_Validate_Hostname();
$validatorEmail = new Zend_Validate_EmailAddress(Zend_Validate_Hostname::ALLOW_DNS, true, $validatorHostname);
$email to test someuser@münche.ch return false
'münche.ch' does not appear to have a valid MX record for the email address 'someuser@münche.ch'
Or this domain as a valid MX
dig mx xn--mnche-kva.ch
; <<>> DiG 9.4.2-P1 <<>> mx xn--mnche-kva.ch
;; global options: printcmd
;; Got answer:
;; >>HEADER<< opcode: QUERY, status: NOERROR, id: 46968
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4
;; QUESTION SECTION:
;xn--mnche-kva.ch. IN MX
;; ANSWER SECTION:
xn-mnche-kva.ch. 43200 IN MX 10 mail.xn-mnche-kva.ch.
;; AUTHORITY SECTION:
xn--mnche-kva.ch. 42170 IN NS ns3.ch-meta.net.
xn--mnche-kva.ch. 42170 IN NS ns.ch-meta.net.
xn--mnche-kva.ch. 42170 IN NS ns2.ch-meta.net.
;; ADDITIONAL SECTION:
mail.xn--mnche-kva.ch. 43200 IN A 80.74.152.70
ns.ch-meta.net. 171770 IN A 80.74.130.30
ns2.ch-meta.net. 171770 IN A 80.74.130.130
ns3.ch-meta.net. 171770 IN A 80.74.144.44
test to confirm
$email = someuser@münchen.ch
return false : this is true the domain doesn't have a mx record.
dig mx xn--mnchen-3ya.ch return nothing ...
Should be corrected before 1.6 release to my opinion
after some try it appear that the ace code in not sended to dns_get_mx it's the full human string
so when münche.ch is write by the user, the dns_get_mx check have to receive this xn--mnche-kva.ch
but validatehostname complain if it is used with the ace chain ...
in an invalid position
xn-
mnche-kva.ch is not valid 'xn-mnche-kva.ch' appears to be a DNS hostname but contains a dash'xn--mnche-kva.ch' appears to be a local network name but local network names are not allowed --->>> this is wrong a local host would be mypc.mydomain.mytld
Not an easy case ...
mnche-kva.ch is not valid 'xn-mnche-kva.ch' appears to be a DNS hostname but contains a dash