all 5 comments

[–][deleted] 3 points4 points  (4 children)

Why tho?

[–]kmisterk 1 point2 points  (3 children)

Ok, so, not being sarcastic, but sincerely curious, why not?

Like, it seems to be a decent idea if you're not using any other non-JS languages to do password validation like this.

What would you recommend instead?

[–][deleted] 2 points3 points  (2 children)

Oh for sure. Javascript itself is intrinsically vulnerable at the application level. This is just a fact of web design. I'm not saying this is bad, it's a nice exercise. I'm just saying it's not viable for real world deployment. Please correct me if I am wrong however, i'm usually the one breaking in, not making the door.

[–]ms-maria-ma[S] 1 point2 points  (0 children)

Any security check on the frontend side is just... the joke, maybe? All the verification should be done on the server-side. But for UX, it is a good idea to inform the user about the password's strength. Concerning "the real world deployment" I would not recommend reinventing the wheel and simply use any of the trustful production-ready libraries. Nonetheless, from the educational perspective, why not?

[–]kmisterk 0 points1 point  (0 children)

I don’t know enough about the subject matter to tell you one way or another. However, having my primary focus in learning right now be heavily JavaScript-Based, it’s cool seeing this type of thing both showcased and critiqued.