Register to reply

Difference between Pasting and typing?

by lionely
Tags: difference, pasting, typing
Share this thread:
lionely
#1
Jan6-14, 02:53 AM
P: 523
One day I was logging into my account on a website and if I copied and pasted the password it didn't work, but if I typed it out it logged me in. I was curious as to why this happens..

Could someone please elaborate for me please.
Phys.Org News Partner Science news on Phys.org
Bees able to spot which flowers offer best rewards before landing
Classic Lewis Carroll character inspires new ecological model
When cooperation counts: Researchers find sperm benefit from grouping together in mice
Adyssa
#2
Jan6-14, 03:00 AM
P: 188
Usually you can paste your password, but it depends where you copied it from, there might invisible characters you can't see. I'm not aware of a method to detect a pasted password as opposed to a typed one on a website.
lionely
#3
Jan6-14, 03:01 AM
P: 523
Oh I see. Thanks!

tiny-tim
#4
Jan6-14, 04:42 AM
Sci Advisor
HW Helper
Thanks
tiny-tim's Avatar
P: 26,157
Question Difference between Pasting and typing?

i've come across the same, but it won't let me paste anything in the box
Psinter
#5
Jan19-14, 05:50 PM
Psinter's Avatar
P: 94
Difference is that they come from different inputs. One comes from the operating system clipboard and another from the keyboard.

Password fields in the web, depending on the language (HTML, AS3, etc.) that the control was implemented can prevent passwords to be inserted from specific inputs. Also, if the control is from HTML it can be modified with JavaScript to reject any clipboard input.

If you are really into discovering what is preventing you from pasting a password, you can try loading the page without say the JavaScript code that is blocking the clipboard input into said field and see if it allows pasting. Just for fun. (Read the terms of use of the web page before. You don't wanna or should mess with something forbidden).
lionely
#6
Jan19-14, 05:53 PM
P: 523
But how does the program know how to differentiate between the clipboard and keyboard. Like the input from the keyboard has a different value or something? I don't really know the jargon. I don't work with these kind of things.
Psinter
#7
Jan19-14, 06:06 PM
Psinter's Avatar
P: 94
Quote Quote by lionely View Post
But how does the program know how to differentiate between the clipboard and keyboard. Like the input from the keyboard has a different value or something? I don't really know the jargon. I don't work with these kind of things.
EDIT: If it is JavaScript, then the language takes care of identifying the input source. It is inner workings that I have no knowledge of.

The web browser provides a layer that signals where the input came from. How exactly that mechanism works is unknown to me for I have never worked with web browsers source code. I really have no idea how that interface between the operating system clipboard and browser works, but it is there.

In Windows application development for example I could make a context menu for a TextBox with a button that reads "Paste" on it. If I wouldn't want my application to allow the user to paste anything in a password TextBox I would go for the onClick() event of that button and activate a flag (it can be a boolean value) so that in another event the password TextBox reads that flag and rejects any input.

Or in the very moment I activate the flag I could disable the TextBox for a few milliseconds, enough to not accept the input.

There are many ways.


Register to reply

Related Discussions
Continuity in topology and the pasting lemma Calculus & Beyond Homework 8
Pasting polarized lenses to a PBS ? Quantum Physics 2
Homeomorphism through cutting and pasting of manifolds Topology and Analysis 9
WYSWYG pasting into the forum Forum Feedback & Announcements 2
Formal definitions of cutting and pasting etc Differential Geometry 5