Opened 8 years ago

Closed 8 years ago

#4270 closed (fixed)

immutable QueryDict allows deletion of keys

Reported by: Gary Wilson <gary.wilson@…> Owned by: adrian
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

>>> from django.http import QueryDict
>>> q=QueryDict('vote')
>>> q
<MultiValueDict: {'vote': ['']}>
>>> del q['vote']
>>> q
<MultiValueDict: {}>

Attachments (1)

4270.diff (1.1 KB) - added by Gary Wilson <gary.wilson@…> 8 years ago.
Added __delitem__ to QueryDict that checks if mutable. Tests too.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Gary Wilson <gary.wilson@…>

Added __delitem__ to QueryDict that checks if mutable. Tests too.

comment:1 Changed 8 years ago by Gary Wilson <gary.wilson@…>

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 8 years ago by mtredinnick

Nice catch, Gary. These little tidying-up patches you've been posting are very useful. Thanks.

comment:3 Changed 8 years ago by mtredinnick

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

(In [5187]) Fixed #4270 -- Don't permit deleting of items from an immutable QueryDict.
Thanks, Gary Wilson.

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