Why would you have a maxlength on password in the first place?!
It's common in practice even if it shouldn't be. Also many bcrypt implementations truncate input longer than 72 characters.
Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
41–50 of 145 posts
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#42Earlier quoted context omitted.
That's their justification, not a restriction on the change, this impacts non-password fields too.
Yeah that's the weird thing. They write "for password fields" and then apply it to non-password fields and even multi-line fields. Have you ever seen a multi-line password field?! I understand that people might abuse for it but that's definitely not the common thing and just crazy talk. It's an excuse but I don't understand the reason behind this change. I've been setting maxlength to generous values on my fields in…
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#43 - HTML spec allows it; says MAY, not MUST [3]
- Affects only user pastes, not javascript edits
- Affects all input boxes, not just password ones
- New preference editor.truncate_user_pastes can restore old behavior
As a developer, I personally find the inconsistent behavior of maxLength unintuitive and am surprised a potentially-breaking change like this didn't have more discussion (although, the original bug report was open for 4 years). But as a user, I have some empathy for the team's desire to fix "broken" websites (e.g. where the login page has a shorter limit than the account creation page or backend).[1] https://phabricator.services.mozilla.com/D71689
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1320229
[3] https://html.spec.whatwg.org/multipage/form-control-infrastr...
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#44Earlier quoted context omitted.
I'm curious, could you describe the usecase?
I have used password-store (pass) to generate passwords and paste them to forms without realizing they were truncated and simultaneously those sites don't have the same maxlength on their login form.
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#45Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#46> The form cannot be submitted until the user fixes the error, so the server shouldn’t receive an excessively long text or password (a server-side validation has to be put in place anyway.) However, this could potentially affect a front-end implementation if it expects the entered text never to exceed maxlength. What century are Mozilla living in? Most, even simple forms, don't use elements and submit buttons anymore…
https://html.spec.whatwg.org/multipage/forms.html#client-sid...
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#47Not sure if this is a title length restriction on HN, but the omitted "...when pasted into..." here seems important.
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#48Earlier quoted context omitted.
One breaks the expectations of users, the other breaks the expectations of developers. On a website full of developers you'll probably see a lot more from one side than from the other.
I'm pretty sure being able to input text longer than the maximum allowable text into a field breaks user's expectations too. Users don't "win" because you made how a site works more confusing. Their justification for this change is the only user-win (password truncation), and they could have trivially restricted this to passwords then body is hurt.
Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#49Re: Text exceeding maxlength will no longer be truncated when pasted in Firefox 77
#50Earlier quoted context omitted.
You just typed your comment into a
So Mozilla's non-standard compliant change broke one fewer site, problem solved? Even for this site, why is Mozilla not limiting this breaking change designed to fix password fields to: Password fields. They haven't described why type=text or even textarea should be non-standard, only why type=password should be. If they limited this to password fields, I'd have no issue. But per the code change they did not.