• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disabling copy and paste option in h:inputText and h:inputSecret

 
Kumar Gaurav
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to disable copy and paste functinality in the textbox for user name and password in login page which have been constructed using
h:inputText and h:inputSecret respectively.

Any input on same will be highly appreciable.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't. I use a password vault app to transfer in user IDs and passwords via the clipboard. Without clipboard paste, I'd have to display the password and enter it manually, which is less secure than pasting.

It would be rude to say the least to disable this function. I realize that people can do unsafe things using copy/paste - like mistyping a password and pasting the mistyped password in twice on a password check, but there are limits to how much obligation there is to protect them from their own stupidity.

Note that the copy function cannot copy a password OUT of a secret input control, only into one. That's true of all known browsers and if you find one that behaves otherwise, consider it to be unsafe.
 
Kumar Gaurav
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Will you elaborate some more. As i m not able to understand it fully.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18226
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Elaborate more about what?
 
Kumar Gaurav
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your answer.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic