Disable undo for password inputs to prevent replay attacks. Bug 271154,

r+sr=dbaron
This commit is contained in:
bzbarsky%mit.edu 2004-12-05 18:26:13 +00:00
Родитель d8feb13099
Коммит 3ae57649b4
2 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -1730,6 +1730,15 @@ nsTextControlFrame::InitEditor()
return rv;
}
if (IsPasswordTextControl()) {
// Disable undo for password textfields. Note that we want to do this at
// the very end of InitEditor, so the calls to EnableUndo when setting the
// default value don't screw us up.
// Since changing the control type does a reframe, we don't have to worry
// about dynamic type changes here.
mEditor->EnableUndo(PR_FALSE);
}
return NS_OK;
}

Просмотреть файл

@ -1730,6 +1730,15 @@ nsTextControlFrame::InitEditor()
return rv;
}
if (IsPasswordTextControl()) {
// Disable undo for password textfields. Note that we want to do this at
// the very end of InitEditor, so the calls to EnableUndo when setting the
// default value don't screw us up.
// Since changing the control type does a reframe, we don't have to worry
// about dynamic type changes here.
mEditor->EnableUndo(PR_FALSE);
}
return NS_OK;
}