diff options
| author | Vinay Karanam <vinayinvicible@gmail.com> | 2016-11-16 18:52:38 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-07 08:28:46 -0500 |
| commit | 4a246a02bdcbc13b15480c014f51cb0682af7c1e (patch) | |
| tree | eebd27f89e806db66f5344b63d63c574578b5697 /django | |
| parent | 183f5015408ffe0d3a22203ddaf7a3a56da025fd (diff) | |
Refs #17235 -- Made MultiPartParser leave request.POST immutable.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/options.py | 2 | ||||
| -rw-r--r-- | django/contrib/auth/admin.py | 1 | ||||
| -rw-r--r-- | django/http/multipartparser.py | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 12487dcc9b..75c256963b 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1785,7 +1785,7 @@ class ModelAdmin(BaseModelAdmin): } if request.method == 'POST': formset_params.update({ - 'data': request.POST, + 'data': request.POST.copy(), 'files': request.FILES, 'save_as_new': '_saveasnew' in request.POST }) diff --git a/django/contrib/auth/admin.py b/django/contrib/auth/admin.py index f84652f8b4..f3c69023be 100644 --- a/django/contrib/auth/admin.py +++ b/django/contrib/auth/admin.py @@ -205,6 +205,7 @@ class UserAdmin(admin.ModelAdmin): # * The user has pressed the 'Save and add another' button # * We are adding a user in a popup if '_addanother' not in request.POST and IS_POPUP_VAR not in request.POST: + request.POST = request.POST.copy() request.POST['_continue'] = 1 return super(UserAdmin, self).response_add(request, obj, post_url_continue) diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py index 87d80bdde5..616185f021 100644 --- a/django/http/multipartparser.py +++ b/django/http/multipartparser.py @@ -289,6 +289,7 @@ class MultiPartParser(object): if retval: break + self._post._mutable = False return self._post, self._files def handle_file_complete(self, old_field_name, counters): |
