Opened 17 years ago

Closed 17 years ago

#4270 closed (fixed)

immutable QueryDict allows deletion of keys

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

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@…> 17 years ago.
Added __delitem__ to QueryDict that checks if mutable. Tests too.

Download all attachments as: .zip

Change History (4)

by Gary Wilson <gary.wilson@…>, 17 years ago

Attachment: 4270.diff added

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

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 17 years ago

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

comment:3 by Malcolm Tredinnick, 17 years ago

Resolution: fixed
Status: newclosed

(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