#35289: Chunked transfer encoding is not handled correctly by MultiPartParser -------------------------------------+------------------------------------- Reporter: Kyle Agronick | Owner: nobody Type: Bug | Status: new Component: HTTP handling | Version: 5.0 Severity: Normal | Resolution: Keywords: transfer-encoding, | Triage Stage: chunked, multi-part | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by Kyle Agronick):
It looks like the only place `content_length` is used is in `MemoryFileUploadHandler` where `self.activated = content_length <= settings.FILE_UPLOAD_MAX_MEMORY_SIZE`. Content-length can be spoofed causing the `MemoryFileUploadHandler` to read everything into memory. It seems like the complexity of `TemporaryFileUploadHandler` and `MemoryFileUploadHandler` could be reduced by having one file handler that uses `SpooledTemporaryFile(max_size=settings.FILE_UPLOAD_MAX_MEMORY_SIZE)`. -- Ticket URL: <https://code.djangoproject.com/ticket/35289#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018e32fae073-31359450-4e86-413d-886c-60c16b85203a-000000%40eu-central-1.amazonses.com.