shellEntry: Disable copy action for password entries
Curently it is possible to copy the content of password entries, and paste it elsewhere in clear text. This is undesirable, so follow GTK+'s behavior and disable the copy action for password entries. https://bugzilla.gnome.org/show_bug.cgi?id=695104
This commit is contained in:
parent
b52f4ed25b
commit
9e31f05861
@ -89,7 +89,8 @@ const EntryMenu = new Lang.Class({
|
|||||||
|
|
||||||
_updateCopyItem: function() {
|
_updateCopyItem: function() {
|
||||||
let selection = this._entry.clutter_text.get_selection();
|
let selection = this._entry.clutter_text.get_selection();
|
||||||
this._copyItem.setSensitive(selection && selection != '');
|
this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
|
||||||
|
selection && selection != '');
|
||||||
},
|
},
|
||||||
|
|
||||||
_updatePasteItem: function() {
|
_updatePasteItem: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user