venta: (Default)
venta ([personal profile] venta) wrote2010-06-08 11:20 am

Don't need no credit card to ride this train

An question about web forms and security...

When filling in forms (I use FireFox), it's often possible to hit the down arrow and get a list of things you previously typed into that field. This is kind of handy, mostly, and results in me not having to type my name or email address out a lot.

Forms taking things like credit card details don't usually do this - for obvious reasons - and I assume the existence of some sort of 'nocache' attribute which the form-writer can set on the fields which contain information which should be a little more secure.

Except today I filled in an entire payment form (card number, expiry date, security code, the lot) from cached information based on me having filled the same form out on that website months ago. This strikes me as Not Good.

I intend to write to the site in question and tell them I think they're a bit rubbish... but I'd like to be sure I know what I'm talking about first. Am I right about the form attribute ? Am I totally wrong, and this is something which FireFox implements wrongly and the site itself can't be blamed for ?

Informed opinion welcome :)

[identity profile] alien8.livejournal.com 2010-06-08 10:32 am (UTC)(link)
Don't send that email.

It's all in your browser. Under the preferences (I'm on a Mac so if you are on Doze it will vary.) Privacy, remember search and form history.

You're not the only one to have found this: http://support.mozilla.com/en-US/forum/1/7920

You can uncheck this - but this is sometimes rather handy.

So, try http://autofillforms.mozdev.org/ which will crypt the settings via your master password.

What? you haven't got one?

do it now : set a Master Password for your profile (Preferences, Security, Use a Master Password)

:)

[identity profile] venta.livejournal.com 2010-06-08 10:43 am (UTC)(link)
It's all in your browser.

While I'm happy to accept that, that doesn't really explain why credit card forms normally *don't* cache the information, but this specific one does.

What? you haven't got one?

I haven't, no. No one uses my laptop but me, and the log-on is password protected. It's locked when I'm away from it, and thus a master password doesn't really seem to bring much to the party.

I'm curious about the autofillforms, so will experiment with it.

[identity profile] venta.livejournal.com 2010-06-08 10:46 am (UTC)(link)
It's all in your browser. Under the preferences (I'm on a Mac so if you are on Doze it will vary.) Privacy, remember search and form history.

Just in case anyone else is reading this and fancies trying it, the Windows settings are:

Tools->Options->Privacy, set "Firefox will..." to "Use custom settings for history" to see the "Remember search and form history" checkbox.

Tools->Options->Security for the master password option.

[identity profile] onebyone.livejournal.com 2010-06-08 10:37 am (UTC)(link)
There is no such attribute, although password controls generally shouldn't be auto-filled from a drop-down menu that displays the password, since that would break the rule that the text is rendered such as to hide the characters.

It's down to the user agent what is cached and how. I just switch it off, especially since I use different email addresses for different sites anyway.

In Firefox you can generally highlight a chunk of site and right-click > "View selection source" to see the HTML. It might be possible to use Firefox-specific and/or javascript tricks to prevent caching.
zotz: (Default)

[personal profile] zotz 2010-06-08 10:38 am (UTC)(link)
Yesterday another of my friends commented that this must mean Love accepts Oyster prepay.

[identity profile] venta.livejournal.com 2010-06-08 10:55 am (UTC)(link)
Ah. I promptly forgot about that and tried to apply [livejournal.com profile] zotz comments to web forms :)
zotz: (Default)

[personal profile] zotz 2010-06-08 11:44 am (UTC)(link)
Always a tricky process, that.

[identity profile] venta.livejournal.com 2010-06-08 11:46 am (UTC)(link)
Yes, I did think you were being more than usually gnomic.
zotz: (Default)

[personal profile] zotz 2010-06-08 11:50 am (UTC)(link)
It was the pointy hat and fishing rod that tipped you off, wasn't it?

Somebody always notices.

[identity profile] venta.livejournal.com 2010-06-08 11:56 am (UTC)(link)
No, I thought they were just sartorial statements.

Popping out of a door in amanita muscaria is a dead giveaway, though.

[identity profile] bateleur.livejournal.com 2010-06-08 10:45 am (UTC)(link)
Some of the comments above are misleading.

The behaviour you want is accomplished by setting the property autocomplete = "off" on the <form> element.

[identity profile] venta.livejournal.com 2010-06-08 10:47 am (UTC)(link)
Aha. Thank you. That explains why credit card forms don't usually display such things. Of course, the above suggestions sound sensible to me anyway, but it's nice to have that mystery cleared up.

[identity profile] bateleur.livejournal.com 2010-06-08 10:49 am (UTC)(link)
the above suggestions sound sensible to me anyway

Well... maybe. There's always a trade-off between security and convenience. I do think it would be reasonable to contact the site and ask them to improve their form.

[identity profile] alien8.livejournal.com 2010-06-08 12:40 pm (UTC)(link)
..and there's nothing to stop a malicious site asking for the same data from your browser.. best not to have it in there.

IMHO Edit your saved data to pull the number.
ext_5939: (horrible)

... might not work...

[identity profile] bondagewoodelf.livejournal.com 2010-06-08 10:54 am (UTC)(link)
autocomplete='off' is happily ignored by many browsers

Re: ... might not work...

[identity profile] venta.livejournal.com 2010-06-08 10:56 am (UTC)(link)
That's a reason not to rely on it, it's not a reason for form-writers not to use it.

Re: ... might not work...

[identity profile] undyingking.livejournal.com 2010-06-08 11:00 am (UTC)(link)
It not being valid HTML might be a reason... Not that writers of commercial web pages seem generally terribly obsessed with standards compliance.

Re: ... might not work...

[identity profile] venta.livejournal.com 2010-06-08 11:03 am (UTC)(link)
Yes, I'm perfectly happy with invalidity as a reason for not using it.
Edited 2010-06-08 11:03 (UTC)

[identity profile] undyingking.livejournal.com 2010-06-08 10:57 am (UTC)(link)
Although it should probably be noted, for standards purists, that autocomplete is not a valid attribute for forms in either HTML 4 or XHTML 1 -- not all browsers may support it (although I think all the important ones do), and pages that include it will fail validation tests.

I believe it is to be included in HTML 5.

[identity profile] bateleur.livejournal.com 2010-06-08 11:04 am (UTC)(link)
Standards purists are lovely people. They deserve a pat on the back and a piece of cake. They should not, however, be trusted to write real web pages.

I had this revelation once shortly after the Netscape "extensions" to HTML first came out. At first I thought they were evil. Then I realised it didn't matter whether they were evil or not, because individual web developers were free to use them or not as they chose and therefore they were an instant de-facto standard on account of being useful. (Whether Netscape themselves were evil for adding them in the first place is a more complex matter...)

[identity profile] ar-gemlad.livejournal.com 2010-06-08 11:10 am (UTC)(link)
Netscape are definitely evil. It was them that did the blink tag, wasn't it?

[identity profile] bateleur.livejournal.com 2010-06-08 11:13 am (UTC)(link)
Still not as annoying as <marquee>! Now that was a really stupid idea...

[identity profile] ar-gemlad.livejournal.com 2010-06-08 11:14 am (UTC)(link)
Now I need to go for memory repression therapy again. To bury the memory...

[identity profile] undyingking.livejournal.com 2010-06-08 11:15 am (UTC)(link)
That one came from IE, if I remember right. Microsoft fighting fire with fire.
(deleted comment)

[identity profile] bateleur.livejournal.com 2010-06-08 11:15 am (UTC)(link)
Awesome! :-D

(Although... isn't JavaScript considered a bit web!satanic by such persons? I'm a bit out of touch.)

[identity profile] undyingking.livejournal.com 2010-06-08 11:13 am (UTC)(link)
Ah yes, good old <CENTER>, how did we live without it? ;-0

I agree, I'm perfectly happy to use de facto standards myself; I figure that's between me and my users. But I can sympathize with the pained expression that some people develop when they see such things.

[identity profile] leathellin.livejournal.com 2010-06-08 11:07 am (UTC)(link)
It is definitely in the draft on form and input.
HTML 5 is one of those more final than it ought to be working drafts :-)