Form::EMAIL prijima „spatnou“ adresu?
- peci1
- Člen | 60
Ahoj, mam Nette 0.9.3 ^ PHP 5.2. Zjistil jsem, ze (JS i PHP) validaci Form::EMAIL projde i adresa typu abcd83@ˇgmail.com (hacek za zavinacem). Nechce se mi zrovna procitat prislusne RFC. Co myslite? Ma tento email projit? Je pravda, ze ted uz nektere TLD dovoluji diakritiku, tak potom snad. Vite o tom nekdo vic?
- Mikulas Dite
- Člen | 756
Na to sem taky koukal, ale oni mluví o local part z local-part@domain. Naproti tomu tam taky píšou the domain name is much more restricted: it must match the requirements for a hostname, consisting of letters, digits, hyphens and dots.
Podle RCF http://tools.ietf.org/html/rfc3696#… The LDH rule, as
updated, provides that the labels (words or strings
separated by periods) that make up a domain name must consist of only
the ASCII [ASCII] alphabetic and numeric characters, plus the hyphen.
No other symbols or punctuation characters are permitted
Je ale možné, že od té doby vyšla nějaká nová rfc.
- peci1
- Člen | 60
Mikulas Dite napsal(a):
the domain name is much more restricted: it must match the requirements for a hostname, consisting of letters, digits, hyphens and dots.
Ahoj, ja tu wiki pochopil trochu jinak:
Notwithstanding the addresses permitted by these standards, some systems impose more
restrictions on e-mail addresses, both in e-mail addresses created on the system and in e-mail
addresses to which messages can be sent. Hotmail, for example, only allows creation of e-mail
addresses using alphanumerics, dot (.), underscore (_) and hyphen (-), and will not allow sending
mail to any e-mail address containing ! # $ % * / ? ^ ` { | } ~[2]. The domain name is much more
restricted: it must match the requirements for a hostname, consisting of letters, digits, hyphens
and dots…
Mne z toho vyplyva, ze to omezeni ma jenom Hotmail.
Nette pise:
$chars = „a-z0–9\x80-\xFF“; // superset of IDN
$domain = „$chars“; // RFC 1034 one domain component
Tedy to vypada, ze Nette povoluje v domene libovolne paznaky. Chapu to spravne?
- Mikulas Dite
- Člen | 756
Je pravda, že některý znaky povolený byly, ty jsou popsaný tady:
http://www.ficora.fi/…nkaytto.html (nebojte, ne finsky ale
anglicky). Ale samotnej háček imho určitě ne.
EDIT: jo, je to pro finsko, ostatní je popsaný v těch specifikacích s linkama úplně dole.
Editoval Mikulas Dite (4. 3. 2010 20:18)