Page MenuHomePhabricator

Add missing `maxlength` attributes to text inputs that are truncated
Closed, ResolvedPublic


A number of special pages allow users to enter a reason or explanation, but don't enforce a maximum length. Since the input is eventually limited to the maximum length (CommentStore::COMMENT_CHARACTER_LIMIT), and the rest of the user's input is cut off, the maximum length should also be enforced on the form.

Steps to reproduce:

  • Add a reason/description of more than 500 characters
  • Save
  • View the saved reason

Expected result:

  • Since the user could input more than 500 characters, they expect that all of the input was saved
  • Actual result, only the first 500 (or 497...) are saved


Known forms without limits:

  • Special:Tags (reason field, for creation, etc)
  • Special:ChangeContentModel

Event Timeline

Restricted Application added a project: User-DannyS712. · View Herald TranscriptSep 30 2019, 5:43 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 539729 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Enforce maximum reason length in forms

DannyS712 moved this task from Unsorted to Awaiting review and deployment on the User-DannyS712 board.

Change 539729 merged by jenkins-bot:
[mediawiki/core@master] Enforce maximum reason length in forms

DannyS712 closed this task as Resolved.Jul 3 2020, 7:24 PM