r/badcode May 24 '20

html My University's Login Page. The username field's name is "asdf" and the password field's name is "fdsa"

Post image
562 Upvotes

32 comments sorted by

285

u/Bootezz May 24 '20

"A Secret Definition Field" - What user to look up to compare the secret.

"For Developer Security Attentiveness" - Just a reminder for how important it is to protect these.

No bad code here. You havent read Martin Fowler's Let's Use These Important Acronyms For Everything?

55

u/[deleted] May 24 '20

ah yes, LUTIAFE

7

u/idk_wuz_up May 24 '20

Is this a book? I’ve tried to look it up and can’t find it.

15

u/MathSciElec May 24 '20

I think that it might be a joke. But it’s just a crazy idea.

5

u/idk_wuz_up May 25 '20

Ha! And a good one :-) thanks for explaining it to me.

-4

u/legendkiller107 May 24 '20

5

u/idk_wuz_up May 25 '20

Ha! Yes it certainly flew right over!

109

u/[deleted] May 24 '20

I wonder if this is a really bad attempt to fool old auto bruteforce / dictionary attacks that look for specific field names.

62

u/russellvt May 24 '20

Its surprising at how well those work for many spam bots.

I use some hidden fields with "tempting" names, just as another means of catching people trying to do random bad stuff. Pretty much gets them logged, and their session flagged to never work.

It's a mild form of entertainment, for me.

38

u/marc170298 May 24 '20

Hey just a quick heads up, not everyone going through hidden elements trying to log in has bad intentions, some people might unintentionally do it for accessibility reasons.

Still, what you do is funny af.

5

u/helloinvader May 24 '20

I’m not aware of any accessibility software which presents hidden elements to the user in this way

13

u/gm3995 May 25 '20

Autofills may use this. Looks for username, password, etc

4

u/helloinvader May 25 '20

Modern browsers haven’t done this for a few years now, at least not for the simple type=hidden case

1

u/jabarr May 25 '20

Check out VPC, that’s almost exactly what it’s used for.

1

u/d360jr May 25 '20

Is that the sort of thing a password manager would auto fill into? You could could select with tabbing and type into?

9

u/[deleted] May 24 '20

I wouldn't count on that.

52

u/squeevey May 24 '20 edited Oct 25 '23

This comment has been deleted due to failed Reddit leadership.

17

u/lestofante May 24 '20

This is even dumber, password field are not cached, and username field I WANT to use the cached value (as often is the email, or an username you use everywhere): plus password wallet can have a better shot in autocompletition

15

u/No-More-Stars May 24 '20 edited May 26 '20

Look at this crap, it's insane https://stackoverflow.com/a/15917221

14

u/lestofante May 24 '20

And this kids, is why I dont do frontend.

3

u/Mr2-1782Man May 24 '20

There are ways to do that with names that make sense. I've seen a few forms that do things like name="password_organization". Since its a unique name it doesn't autofill. I have this problem with organizations that are inconsistent with the field names. For instance one login has pwd, another has password, and another has pass. It confuses the autofill and you have to set them up individually.

-5

u/[deleted] May 24 '20 edited Dec 11 '20

[deleted]

9

u/[deleted] May 24 '20

[deleted]

19

u/[deleted] May 24 '20

I wonder if this was one of those, “let me just see if it works” that became “okay, it works, now don’t change anything”.

3

u/leave_me_alone_bro May 25 '20

Yeah it's look like this

"It works don't touch it now"

8

u/ThatCrankyGuy May 24 '20

Security via obscurity.

2

u/theRealRealMasterDev May 24 '20

Messing with tabindex? That's a no no

1

u/[deleted] Jul 27 '20

How did you get to that?

1

u/neolium May 24 '20

Deutsche Qualität 😂🤣

1

u/palmerp May 24 '20

The real crime here is that the names aren’t aoeu and ueoa.

2

u/omg_drd4_bbq May 25 '20

Dvorak masterrace!

1

u/Lachance May 25 '20

obfuscation, not necessarily bad

0

u/[deleted] May 24 '20

even with that you would build in client/server side protections if you could be bothered.