Add CSRF to the upload #4

Closed
opened 2023-10-18 02:08:10 +00:00 by BlakeRain · 1 comment
Owner

Currently the multipart upload code doesn't implement the CSRF check. There's a few things to consider here:

  1. Can we ensure that the CSRF token is the first field in the multipart form? How does the XMLHttpRequest order the fields?
  2. If they can be ordered then we can make sure that the CSRF has been seen (and validated) before we start processing the upload; and terminate the request if not.
  3. If we cannot control the order, then we'll have to go through the entire upload before we can validate the CSRF? Seems a bit lame.
Currently the multipart upload code doesn't implement the CSRF check. There's a few things to consider here: 1. Can we ensure that the CSRF token is the first field in the multipart form? How does the `XMLHttpRequest` order the fields? 2. If they can be ordered then we can make sure that the CSRF has been seen (and validated) before we start processing the upload; and terminate the request if not. 3. If we cannot control the order, then we'll have to go through the entire upload before we can validate the CSRF? Seems a bit lame.
BlakeRain added this to the v2.0.0 milestone 2023-10-18 02:08:10 +00:00
BlakeRain added the
bug
label 2023-10-18 02:08:10 +00:00
BlakeRain self-assigned this 2024-08-07 13:52:49 +00:00
Author
Owner

This has been added.

This has been added.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: BlakeRain/parcel#4
No description provided.