[wp-trac] [WordPress Trac] #61703: the_password_form hook documentation incorrectly references 20char password limit
WordPress Trac
noreply at wordpress.org
Thu Aug 1 22:47:52 UTC 2024
#61703: the_password_form hook documentation incorrectly references 20char password
limit
-------------------------------+-----------------------------
Reporter: dd32 | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 6.7
Component: Posts, Post Types | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
-------------------------------+-----------------------------
Comment (by peterwilsoncc):
I've finally figured out what was actually wrong with the filter's docs.
The docs were confusing the `size` attribute with the `maxlength`
attribute. `size` sets the width of display of the input, whereas
`maxlength` sets the maximum number of characters allowed in the field.
This makes my advice yesterday incorrect, sorry.
Revising my thoughts appropriately:
* the field's `size` attribute should remain unchanged to avoid horizontal
scroll in browser windows
* the docs should be updated to read: "If modifying the password input,
please note that the WordPress database schema limits the password length
to 255 characters regardless of the value of any `minlength` or
`maxlength` attributes or other validation that may be added to the
input."
Having thought about it overnight, I don't think WordPress should limit
the length of the input on the front end as entering a 300 character long
password is an incorrect password and it would be a bad idea for WordPress
to correct that to a possibly correct password.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61703#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list