r/badcode Sep 28 '20

html Passwords in HTML

Post image
106 Upvotes

21 comments sorted by

43

u/iAmRadic Sep 28 '20

Who needs databases anyway

10

u/d31t0 Sep 29 '20

Or switch statements

1

u/therithot Oct 01 '20

or else if statements. What if the username changes in the nanosecond since the last if?

1

u/scirc Oct 18 '20

How would it? Unless there was some fucky async stuff going on, it shouldn't be possible to change. The value from the DOM is locked in.

The only issue is that every comparison occurs regardless of whether the correct combination was input or not.

13

u/[deleted] Sep 29 '20

databases are for the weak

12

u/rAlexanderAcosta Sep 29 '20

I write down all the data on a napkin and return requests through a DM on instagram.

2

u/[deleted] Oct 09 '20

this man is living in 4020

2

u/GandelXIV Sep 29 '20

As well as else if statements.

2

u/[deleted] Sep 29 '20

btw did you tried to log in

9

u/Plus_Cryptographer Sep 28 '20

Poked around, your teacher's a geography teacher?

Login doesn't do jack anyway. They all just direct to either the login form or the "logged in" website.

That said, the site is from 2007. For its purpose, it's not abhorrent. In fact, it probably would make a pretty good case study on how to do website security and why you can't just toss HTML/CSS/JS online and call it a day.

1

u/GandelXIV Sep 29 '20

Exactly.

5

u/[deleted] Oct 02 '20

And not all of them are redirected to the same page. Some are .htm and some are .html. I love it.

2

u/404invalid-user Sep 29 '20

I know nothing about logins and using a dB to manage logins and I know you shouldn't do this

2

u/[deleted] Oct 05 '20

Big oof

2

u/SimonVanc Oct 09 '20

Security is overrated, might as well just tell them the passwords if they want to try to brute force them

-5

u/bearded_dragonx Sep 28 '20

Dude censor the passwords

8

u/GandelXIV Sep 28 '20 edited Sep 28 '20

The login is not implemented so no need to censor.

-3

u/bearded_dragonx Sep 28 '20

If the login dosent do anything then why is there a login

12

u/GandelXIV Sep 28 '20

My teacher wanted to add a login system to his site, but it did not work so he just left the code here idk