Comment

Comment by flufluflufluffy

> This is one example why we shouldn't use the maxlength attribute on the password field.

While I acknowledge your issue is incredibly frustrating, it is still good practice to use the maxlength attribute. Yes, it can be bypassed. Yes, you should still check the length on the backend. But it’s one more layer of ensuring sanitary input. Obviously, companies should do a better job of communicating the maximum password length to the user, properly setting the attributes on all inputs, AND if they do enforce a max length, having it be large enough that it ensures a secure password, but we shouldn’t just abandon using the HTML attribute altogether.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton