Ticket #15879: multipart_file_with_emptry_string_name.patch
File multipart_file_with_emptry_string_name.patch, 951 bytes (added by , 14 years ago) |
---|
-
django/http/multipartparser.py
163 163 elif item_type == FILE: 164 164 # This is a file, use the handler... 165 165 file_name = disposition.get('filename') 166 if not file_name:167 continue166 if file_name == '': 167 file_name = None 168 168 file_name = force_unicode(file_name, encoding, errors='replace') 169 169 file_name = self.IE_sanitize(unescape_entities(file_name)) 170 170 … … 586 586 587 587 if name == 'content-disposition': 588 588 TYPE = FIELD 589 if params.get('filename'):589 if 'filename' in params: 590 590 TYPE = FILE 591 591 592 592 outdict[name] = value, params