Bug 8228 - No handling for multipart POST requests
Summary: No handling for multipart POST requests
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Target Milestone: LowPrio
Assignee: Bugzilla mail exporter
Depends on:
Reported: 2023-09-14 12:54 CEST by Alexander Zeijlon
Modified: 2023-09-19 13:12 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Description Alexander Zeijlon cendio 2023-09-14 12:54:02 CEST
In bug 8161 we replaced the deprecated Lib/cgi.py with our own function for parsing POST requests, called parse_post_request, which only handles requests where the request body is URL-encoded.

It is not a complete replacement for the cgi.FieldStorage class we used previously, which can handle arbitrary Content-Types. Most importantly, cgi.FieldStorage handles the multipart Content-Type, which is used when you e.g. want to allow users to upload large files via an HTML-form.

We should therefore add handling for multipart requests [1] to our parse_post_request in case this is needed in the future.

[1] Keep in mind that a multipart request can contain arbitrary Content-Types in the request body.
Comment 1 Samuel Mannehed cendio 2023-09-14 14:36:36 CEST

Note You need to log in before you can comment on or make changes to this bug.