Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#10149 closed (fixed)

FileField doesn't validate max_length

Reported by: Massimo Scamarcia <massimo.scamarcia@…> Owned by: jkocherhans
Component: Forms Version:
Severity: Keywords: FileField ImageField max_length
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

FileField doesn't validate the max_length argument. When you try to upload a file with a very long name, the value stored into the column is truncated to max_length value.

Attachments (2)

filefield_patch_and_tests-r9962.diff (3.7 KB) - added by Pablo Suárez Hdez. 8 years ago.
FieldField patch and tests
10149.diff (3.8 KB) - added by jkocherhans 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by Jacob

milestone: 1.1
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Pablo Suárez Hdez.

Owner: changed from nobody to Pablo Suárez Hdez.
Status: newassigned

Changed 8 years ago by Pablo Suárez Hdez.

FieldField patch and tests

comment:3 Changed 8 years ago by Pablo Suárez Hdez.

Has patch: set

comment:4 Changed 8 years ago by jkocherhans

Owner: changed from Pablo Suárez Hdez. to jkocherhans
Status: assignednew

Changed 8 years ago by jkocherhans

Attachment: 10149.diff added

comment:5 Changed 8 years ago by jkocherhans

Resolution: fixed
Status: newclosed

(In [10227]) Fixed #10149. FileFields in a form now validate max_length. Based on a patch by Massimo Scamarcia.

comment:6 Changed 8 years ago by jkocherhans

(In [10232]) [1.0.X] Fixed #10149. FileFields? in a form now validate max_length. Based on a patch by Massimo Scamarcia. Backport of r10227 from trunk.

comment:7 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top