Opened 7 years ago

Closed 6 years ago

Last modified 4 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 meaksh 6 years ago.
FieldField patch and tests
10149.diff (3.8 KB) - added by jkocherhans 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by meaksh

  • Owner changed from nobody to meaksh
  • Status changed from new to assigned

Changed 6 years ago by meaksh

FieldField patch and tests

comment:3 Changed 6 years ago by meaksh

  • Has patch set

comment:4 Changed 6 years ago by jkocherhans

  • Owner changed from meaksh to jkocherhans
  • Status changed from assigned to new

Changed 6 years ago by jkocherhans

comment:5 Changed 6 years ago by jkocherhans

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:6 Changed 6 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 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

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