mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 07:42:26 +01:00
* Ask for permission when editing external password fields.
* Bump maxVersion to 3.6b1
This commit is contained in:
@@ -885,7 +885,7 @@ function Editor() //{{{
|
||||
},
|
||||
|
||||
// TODO: clean up with 2 functions for textboxes and currentEditor?
|
||||
editFieldExternally: function ()
|
||||
editFieldExternally: function (forceEditing)
|
||||
{
|
||||
if (!options["editor"])
|
||||
return false;
|
||||
@@ -894,11 +894,15 @@ function Editor() //{{{
|
||||
if (!(config.isComposeWindow))
|
||||
textBox = liberator.focus;
|
||||
|
||||
if (textBox.type == "password")
|
||||
if (!forceEditing && textBox && textBox.type == "password")
|
||||
{
|
||||
liberator.beep();
|
||||
liberator.echoerr("Cannot edit password fields");
|
||||
return false;
|
||||
commandline.input("Editing a password field externally will reveal the password. Would you like to continue? (yes/[no]): ",
|
||||
function (resp)
|
||||
{
|
||||
if (resp && resp.match(/^y(es)?$/i))
|
||||
return editor.editFieldExternally(true);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let text = ""; // XXX
|
||||
|
||||
Reference in New Issue
Block a user