Re: OT: 2D Barcodes on Junk Mail



On Aug 2, 3:10�am, Robert Baer <robertb...@xxxxxxxxxxxx> wrote:

� �Most of these stupidites are on forms where one is requesting
information.
� �One would think that a requester knows their own e-mail address and
if reasonably desirous of an answer, that they would enter their e-mail
correctly.


The problem is that validating an email in software is actually not
that trivial.
Obviously, you can check for ANY entry, that's easy.
If the field is left blank, the Server (or local script) can alert the
user. No big deal.

But once you get past that, it becomes a little tricky.
Some characters are invalid in email addresses, so you have to trap
for those.
An email must contain a single "@" sign, and at least 1 dot (and
possibily more), but not two adjacent dots. It must also end in a
valid suffix, like "com", "net", "us, "biz", etc.... And more are
being added all the time, so you would have to keep adjusting your
server or script code to handle that possibility. Finally, the email
address can contain no whitespaces, such as tabs, spaces, etc...

Then you have some characters which, while not prohibited in the
address, can confuse the hell out of software (both server & client
side, plus everything along the route.) These are characters like:

0x26H - "&" - which is a UNIX shell special character and must be URL
encoded anyway.
0x27H - The apostrophe, (which might get lost in subsequently quoted
text).
0x2AH - The "*" asterisk, which is often used as a wildcard
0x2CH - The comma, which is used to separate email addresses from each
other
0x2FH - The forward slash

...you get the idea, and if not, here's a listing and completel
explaination of some of the potentially confusing aspects of these and
other characters when used in an email address:

http://www.remote.org/jochen/mail/info/chars.html

So, given all of this, it's often easier (in software - either server
side or local script) to just ask the respondant to enter their email
address information twice and do a simple string comparison. If
either field is missing, or if the two fields don't match - that's
usually good enough to flag as an error.

Mike is absolutely right. We collect info from our customers all the
time. We often get bad info on forms. You would be amazed how many
people use a URL for a valid email address, for example. (Some folks
evidently don't know the difference!)

-mpm
.



Relevant Pages

  • Re: Subject text length limit in system.net.mail?
    ... If u fix your issue and everything will be working fine, than what if the client, who u ship the app, decided to change the mail server? ... I'd suggest to review your architecture, and add feature to send the links to pre-generated html pages published somewhere. ... AM> While going over those limits does not cause an exception, ... AM> stuff for invalid characters that might cause the process to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Writeup by Amit Klein (Trusteer): Address Bar Spoofing for IE6
    ... The address bar appears like ... This write-up presents two new phishing attack techniques, ... characters are not displayed in the address bar in some cases. ... It was also verified that BIND 9 (the most popular DNS server ...
    (Bugtraq)
  • Re: Client Server socket behavior on XP different for 127.0.0.1
    ... > be sure that the characters you send are the characters you receive. ... This splitting and concatenating is affected by network ... The error message/traceback from the server log file is as follows: ... The server gets the same exception it would get for a client ...
    (comp.lang.java.programmer)
  • Re: Old project / new server - Pdox 8, file name too long
    ... It's on how long filenames, other than 8.3, are encoded by different ... characters than letters and digits. ... be server related. ... The exact error message ...
    (comp.databases.paradox)
  • Re: browser based game development
    ... browser call a local script or exe to perform a calculation and return ... To run locally you would need to provide a small basic web server that could process the CGI game logic. ...
    (comp.games.development.programming.misc)