Homec4science

Prevent file download without POST + CSRF

Authored by epriestley <git@epriestley.com> on Aug 2 2011, 06:01.

Description

Prevent file download without POST + CSRF

Summary: This prevents <applet /> attacks unless the attacker can upload an
applet which has a viewable MIME type as detected by file. I'm not sure if
this is possible or not. It should, at least, narrow the attack window. There
are no real tradeoffs here, this is probably a strictly better application
behavior regardless of the security issues.
Test Plan:

  • Tried to download a file via GET, got redirected to info.
  • Downloaded a file via POST + CSRF from the info page.

Reviewers: andrewjcg, erling, aran, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 759

Details

Committed
epriestley <git@epriestley.com>Aug 16 2011, 22:19
Pushed
aubortJan 31 2017, 17:16
Parents
rPH3aa17c74436e: Prevent CSRF uploads via /file/dropupload/
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH355b753df70c: Prevent file download without POST + CSRF (authored by epriestley <git@epriestley.com>).Aug 16 2011, 22:19