me_and: (bunny!)
[personal profile] me_and

For quite some time (at least months, maybe a year or so), I've been getting the occasional email where what should clearly be a "." in a link has become "..": and the like. I'd assumed it was just a reasonably common typo for a reason I couldn't quite fathom, and never wondered much about it.

Until today, where I had a brief exchange of emails with the people who'd sent one such duff link, and they reported that nobody else had had that problem. So I figured it may be something on my end, and dug a little deeper.

Have a look at this chunk of raw email content (edited to preserve style while removing private data):

2xEuthkrNGNbo&sa=3DD&usg=uehcAIUEQhRCSmhnsT_uAKXIUEhbhtahtdTH" styl=
NotHere/IAmNotTheFileEither.txt</a></span></p><p style=3D"padding:0px;margi=
n:0px;font-size:11pt;font-family:Arial;height:11pt;direction:ltr"></p><p st=
r">Both are zipped folders that contain the tracks, digital artwork and cre=
dits. If you are unsure which version to download then go for the Mp3s.<br>=
<br>This album has a story, which you can read here:<br><span style=3D"colo=
r:rgb(17,85,204);text-decoration:underline"><a href=3D"
26jkoROUA" style=3D"color:inherit;text-decoration:inherit">http://www.indel=</a></span></p><p style=3D"padding:0px;margin:0px=
;font-size:11pt;font-family:Arial;direction:ltr"><br>As ever, our PR budget=
 is paid in kind with the kindness of strangers. We believe that these thin=
gs are possible without gatekeepers and central authorities - but we are su=
stained in that belief only by your willingness to go along with them. As s=
uch, anything you can do to help spread the word about this crowdfunding ef=
fort will really, really help us out. Please share the link to:</p><p style=
ection:ltr"></p><p style=3D"padding:0px;margin:0px;font-size:11pt;font-fami=

This is HTML in a single dense block with line continuations marked with "=". As there's no reason not to, the lines are all the same length, a reasonably standard 76 characters. All the lines, that is, except one, which noticeably sticks out. And what's that at the start of the line? A double dot where there ought to be a single one. There are other examples in this email, while all the other dots are untouched.

It looks like somewhere in the various hops emails take on their way to my inbox, something is switching any "." in the first column of a line to "..".

Now begins the task of working out who runs that server and what the frell they're doing with my email (although I have suspicions as to the likely culprit). But. Wow. Good bug.

Date: 4 Sep 2015 01:50 pm (UTC)
davidgillon: A pair of crutches, hanging from coat hooks, reflected in a mirror (Default)
From: [personal profile] davidgillon
Now begins the task of working out who runs that server and what the frell they're doing with my email

And why!?! would be pretty prominent in my mind! I can understand processing the header, but the body? Even google-style data-stripmining shouldn't need you to rewrite the contents, you're just making work for yourself and inviting the bugs in.

Date: 4 Sep 2015 03:00 pm (UTC)
simont: (Default)
From: [personal profile] simont
(This went past on my network page; apparently we both know [personal profile] kaberett. Hello.)

The phrase "dot stuffing" rang a vague bell in my head when I read this, and indeed, something relevant-looking is specified in RFC 5321 ยง4.5.2. To summarise: when mail is transferred by SMTP, sending a single "." on a line by itself is taken to terminate the message. Therefore, to make it possible to send emails one of whose actual intended lines of content consists of a "." by itself, the message is transformed during transmission to prefix an extra "." to any line starting with ".".

The idea, of course, is that the receiving SMTP agent undoes the transformation and the mail content is restored to its original state. But here, it looks very much as if some receiving SMTP agent along the chain has forgotten to undo the dot-stuffing.

Date: 5 Sep 2015 07:37 pm (UTC)
silveradept: A kodama with a trombone. The trombone is playing music, even though it is held in a rest position (Default)
From: [personal profile] silveradept
Rather impressive bug there. And excellent for noticing it - an extra dot wouldn't trip a lot of people's notice.


me_and: (Default)

December 2015

7 8910111213

Style Credit