After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 482159 - Should not allow to use Ctrl+V to paste in the Leave Message box
Should not allow to use Ctrl+V to paste in the Leave Message box
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: general
2.20.x
Other Linux
: High critical
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
: 483424 501122 503005 527341 564165 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-01 13:24 UTC by Pedro Villavicencio
Modified: 2014-02-21 21:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Maybe this is enaough to confirm the bug (167.10 KB, image/png)
2007-11-04 15:25 UTC, Srikrishan
Details

Description Pedro Villavicencio 2007-10-01 13:24:35 UTC
This bug has been filled here:

https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/146862

"Pressing Ctrl+V while leaving a message pastes the contents of the clipboard. As the session is locked, should potentially anybody be able to see what's on your clipboard?"
Comment 1 Srikrishan 2007-11-04 15:25:10 UTC
Created attachment 98517 [details]
Maybe this is enaough to confirm the bug

I copied the text from the main page of this bug from bugzill.gnome.org
then locked the screen
tried to keep a message for myself and pressed ctrl+v in the message box...it pasted text.
Comment 2 Srikrishan 2007-11-04 15:26:08 UTC
Attached screenshot .png as..Maybe that will confirm this bug.

I copied the text from the main page of this bug from bugzill.gnome.org
then locked the screen
tried to keep a message for myself and pressed ctrl+v in the message box...it pasted text.
Comment 3 Teppo Turtiainen 2007-12-04 21:07:39 UTC
*** Bug 483424 has been marked as a duplicate of this bug. ***
Comment 4 Teppo Turtiainen 2007-12-04 21:07:47 UTC
*** Bug 501122 has been marked as a duplicate of this bug. ***
Comment 5 Teppo Turtiainen 2007-12-04 21:12:47 UTC
Confirmed with gnome-screensaver 2.20.0 on Ubuntu Gutsy.
Comment 6 Sebastien Bacher 2007-12-12 18:25:11 UTC
*** Bug 503005 has been marked as a duplicate of this bug. ***
Comment 7 William Jon McCann 2007-12-12 21:57:52 UTC
I've changed it to clear the primary and clipboard selections before showing the dialog.  I think this is a reasonable thing to do since the locked screen implies that the user has been away for a while and has already interrupted their workflow.  The only other option I think is to block the paste action for every possible input widget.  Which doesn't seem as nice.

One thing that wasn't obvious to me is why clipboard_clear doesn't actually unset the selection - you have to set a new one to do that.

Anyway, fixed in 2.20 and trunk.
Comment 8 Teppo Turtiainen 2007-12-12 22:26:18 UTC
(In reply to comment #7)
> I've changed it to clear the primary and clipboard selections before showing
> the dialog.  I think this is a reasonable thing to do since the locked screen
> implies that the user has been away for a while and has already interrupted
> their workflow.  The only other option I think is to block the paste action for
> every possible input widget.  Which doesn't seem as nice.

Thanks for fixing this, but I'm not sure if this is the optimal solution. The screensaver and the clipboard really have nothing to do with each other and I think the one shouldn't mess with the other if it is avoidable. While you are probably right that most users don't care about the contents of the clipboard after locking the screen, it is possible come up with use cases where they might. What's wrong with just blocking the paste action?
Comment 9 jellegeerts 2007-12-13 09:50:42 UTC
Or optionally, how about getting the contents and setting them back after the screen was unlocked?

I agree with Turtiainen in that there are cases where you might care about the contents after locking the screen. For example, what if you're idle and screensaver timeout values aren't high (usually on laptops), and the screensaver was just turned on while you were idle or talking with somebody; you probably wanted to continue working...
Comment 10 Srikrishan 2007-12-13 11:12:43 UTC
This is a kind of data loss.
If this fix is kept the way it is presently, some day or other ..smbdy(not me) will file another Bug to fix the fix.

Both the alternatives provided are good.

-Sri
Comment 11 jellegeerts 2007-12-20 16:31:05 UTC
Can someone comment on how this bug was fixed?
Comment 12 Paul Wise 2008-03-14 10:24:57 UTC
Jelle Geerts: it was fixed badly (introduces a data loss bug).
Comment 13 Ray Strode [halfline] 2008-04-10 22:21:48 UTC
*** Bug 527341 has been marked as a duplicate of this bug. ***
Comment 14 d ellison 2008-06-15 20:43:47 UTC
I do not see this as a permanent fix. I think either a new bug as a result of the fix needs raising or this fix changing to block any cut / paste / clipboard functionality whilst locked. Which resumes after unlock.
Comment 15 Robert Buchholz 2009-02-08 18:58:03 UTC
(In reply to comment #14)
> I do not see this as a permanent fix. I think either a new bug as a result of
> the fix needs raising or this fix changing to block any cut / paste / clipboard
> functionality whilst locked. Which resumes after unlock.

This would be bug 564165, bug 522386 or bug 522537.
Comment 16 William Jon McCann 2010-01-29 01:35:02 UTC
*** Bug 564165 has been marked as a duplicate of this bug. ***
Comment 17 Michael Thayer 2014-02-21 07:22:34 UTC
This is causing us problems with Ubuntu VirtualBox guests with the shared clipboard enabled.  When the guest screen saver triggers, clearing the guest clipboard also clears the host one.  Give that the "Leave a message" feature, which this was designed to protect, was removed three and a half years ago, would it be possible to revert the clipboard clearing patch now?

Of course I can provide a reverting patch if that helps, but I doubt that will really do much for you.
Comment 18 Ray Strode [halfline] 2014-02-21 19:11:39 UTC
gnome-screensaver hasn't been maintained for years.
Comment 19 Michael Thayer 2014-02-21 19:35:25 UTC
I realise it is not being used with standard GNOME 3, but Ubuntu are using it, and it is still being updated on occasion in git.  If someone can revert the change I will poke them to try to get them to import it.
Comment 20 William Jon McCann 2014-02-21 21:06:11 UTC
In any case commenting in a close bug is really frowned upon. If there is an issue with this please open a new bug and just mention this one.