The second I can't test, but looking at the screenshot, it appears that Safari actually fills in the text field with the contents of the auto-fill, before you actually choose that auto-fill, and it highlights that text so typing something overwrites it, which is a standard way of doing autofill. However, using script to ask the textbox for its contents then exposes sensitive data. In contrast, other browsers display the sensitive data in (inaccessible to script) browser chrome, so no data is exposed.
Safari: R|*obin Message* (in the textbox itself)
Firefox: R|
Robin Message (in a popup, push down to get to it)They do not use your system's address book to fill forms online.
The most important distinction though, is that you have to still select to fill that out manually.
Of course logins are another story - those are automatically filled in. But those are restricted to the page you already entered them on, and you have to decide you want that information filled explicitly.
Steps:
1. Go to a popular site that makes one fill out the information you want to steal.
2. Record the name they use for all their fields (afaik this is how FF determines what value to supply)
3. Use the hack to make a form with those fields
4. Profit
On step 3, it may be that you have to enter the field and type something to get the auto-complete to kick in, but that's easy: you only need to try 26 letters and 10 numbers to get a hit.
Step 1 and 2 aren't required - the field names are 'standard'.
Step 3 is what the test page does already.
Edit: It looks like the javascript used to generate keypresses isn't supported by Firefox:
https://developer.mozilla.org/en/DOM/document.createEvent
var event = document.createEvent('TextEvent');
event.initTextEvent('textInput', true, true, null, char);
input.value = "";
input.selectionStart = 0;
input.selectionEnd = 0;
input.focus();
input.dispatchEvent(event);Details here: http://www.advogato.org/person/mbrubeck/diary/92.html
I havent used the autofill feature (have never trusted it), but in Chrome apparently it is site-specific, and requires user intervention for it to work. I'd be interested in how FF handles it.