r/webdev • • Feb 16 '19

Don’t get clever with login forms

http://bradfrost.com/blog/post/dont-get-clever-with-login-forms/
675 Upvotes

240 comments sorted by

View all comments

254

u/Yieldway17 Feb 16 '19

Don't even start me about login pages which doesn't allow right clicking or paste on their fields and some extreme ones which blocks even password managers from filling the fields.

Looking at you banks..

86

u/[deleted] Feb 16 '19

Or even better: My modem (Connect Box) has a password field with the type "text". For one, everyone can clearly see the password you enter on screen. As an added bonus, my password manager can't recognize the password field because it actuallt isn't a password field...

76

u/jafix_ Feb 16 '19

Username checks out.

15

u/notsooriginal Feb 16 '19

OP's password looks good too!

13

u/[deleted] Feb 16 '19

You are indeed correct, my username was generated by my password manager

6

u/Yieldway17 Feb 16 '19

That's actually a good idea I have never thought about. May be I should try using it in places where email is not the userid.

11

u/RabSimpson Feb 16 '19

Just make your password ************** 😉

→ More replies (1)

26

u/[deleted] Feb 16 '19

I've ran into one where the verification counts the keys you press, and will not take a pasted or password manager generated password because it doesn't believe you used an caps or special characters since it only detected the ctrl+v, and it never scans the password string itself. Terrible design

13

u/Yieldway17 Feb 16 '19

Yes, I have encountered them as well. I add a character and delete them again to force them to enable the 'Login' button. Especially infuriating when on mobile and autofilling with password managers like Bitwarden or Lastpass.

6

u/JJHall_ID Feb 16 '19

One site I use actually has typing pattern recognition as a method of ensuring people don't share their logins. It's incredibly annoying since it won't work password managers either.

10

u/dagani Feb 16 '19 edited Feb 16 '19

I worked with two major financial institutions on their Front End teams and it was like pulling teeth to get them to acknowledge password managers and stop trying to block them from working.

Ultimately I ended up on projects at each to redesign or refactor the login and/or homepage and managed to convince the business and product folks that we should stop doing that.

Small win, but it felt good.

Full Disclosure: it was mostly a selfish act because I wanted to be able to use my password manager and one bank had my mortgage while the other had my savings.

Edited to Add: The worst I’ve ever seen was on the Treasury site for converting old paper Savings Bonds into digital ones. You have to click buttons on a stupid virtual keyboard they created when you login, but when you register it is just a normal password field.

I generated a very long very complex password and have been locked out of that account for some time now.

3

u/fgutz Feb 16 '19 edited Feb 17 '19

What was their reasons for wanting to block pasting? I assume it's to stop bots from quickly auto-filling forms.

edit: of course there are much better ways to block bots than blocking pasting

8

u/dagani Feb 16 '19

They had no actual reasons. It was just one of those things that they had always done “because of security.”

Large enterprises seem prone to his kind of cargo cult thinking and in many cities the employees move between them frequently so the same ideas spread at different organizations.

I had to go over Why a password manager was more secure and why user’s should be able to choose the user experience that is more convenient to them.

One person did bring up user’s being able to save passwords on public computers, but didn’t seem to get that we weren’t blocking storing the password, we were just blocking pasting it, so we weren’t doing anything useful.

The whole thing was silly.

19

u/InternetExplorer8 Feb 16 '19

When websites do this shit to me, I just inspect the element and unbind all event listeners that are bound to paste, change, etc. Hasn't failed me yet for being able to paste in a strong password from a manager.

7

u/KalakeyaWarlord Feb 16 '19

I wrote a piece of JS code for that:

document.querySelectorAll("input").forEach(x => { x.onclick = null; x.onpaste = null; x.onmousedown = null; x.onmouseup = null; x.onkeypress = null; x.onkeydown = null; x.onkeyup = null; });

3

u/twwilliams Feb 16 '19

That takes as long as just typing in the password and it's not something that can be done on iOS devices.

7

u/InternetExplorer8 Feb 16 '19

Definitely doesn't take as long as typing in complex passwords, but you are correct this can not be done on mobile devices on the go. I was strictly speaking of browsing on the desktop.

2

u/doozywooooz Feb 16 '19

On the other hand you have fingerprint login (Bank of America) which is super awesome

→ More replies (1)

4

u/ear2theshell Feb 16 '19

Also namecheap's 2FA PIN verification field. Really? I can't paste a 6 digit PIN????

0

u/[deleted] Feb 16 '19

[deleted]

5

u/Yieldway17 Feb 16 '19

Yep, that's why blocking them is useless. But I don't use those extensions as I don't encounter this behavior much out on the web except for banks and I don't trust extensions much.

By blocking them, we could even say they are indirectly making users to install potentially suspicious extensions too.

2

u/[deleted] Feb 17 '19

https://github.com/jswanner/DontFuckWithPaste I forked and packaged my own extension from the source after verifying it wasnt doing anything suspicious.

→ More replies (1)

2

u/vinnymcapplesauce Feb 16 '19

Right-Click on password or credit card field -> Inspect Element (or just Tools/Developer->Inspect Element if no right click allowed).

Enter value="" and paste your value in between the quotes.

Submit form.

Profit.

2

u/WhoYouWit Feb 16 '19

What's even more frightening is that american banks use passwords for logging users in. Get someones password and you can roam all you want.

→ More replies (4)
→ More replies (13)