2718.us blog » sld http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 Input Validation: Check your RFCs http://2718.us/blog/2008/05/01/input-validation-check-your-rfcs/ http://2718.us/blog/2008/05/01/input-validation-check-your-rfcs/#comments Thu, 01 May 2008 16:31:33 +0000 2718.us http://2718.us/blog/?p=31 Most drop-in “is this a valid-form email?” functions do label certain valid email addresses as invalid.  In particular, while highly unlikely, it is valid to have an email address at a TLD.  Why did this come to mind?  Very circuitously.  I was watching YouTube videos when I noticed that it was loading stuff from “i.ytimg.com,” which is NOT a valid FQDN.  Each part of a FQDN must be at least two characters, with the special exception of the root nameservers.  While nearly everyone and everything handles single-character hostnames nowadays, there have been and probably still are some servers that choke on single-character hostnames (I know that I’ve had issues with email addresses with single-character hostnames).

By the way, the combination of these two things means that the shortest email address that will validate in (nearly) all format-validation routines is a single character at a two-character SLD under a two-character coutry-code TLD, such as “[email protected]”.

]]>
http://2718.us/blog/2008/05/01/input-validation-check-your-rfcs/feed/ 0