From 9e31f05861e95cd48020a7b5f1573bd5b7c17c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 4 Mar 2013 16:22:16 +0100 Subject: [PATCH] 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 --- js/ui/shellEntry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index b71c809f1..61e43a9e3 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -89,7 +89,8 @@ const EntryMenu = new Lang.Class({ _updateCopyItem: function() { 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() {