freedomofpress/securedrop — pull request #220 by jacksingleton (2013-12-09 08:23:06+00:00)
Title: Sanitize submission filename

It turns out werkzeug has a secure_filename function, so I just ran the upload filename through that.

Seems to do what we want. "../" is removed and "/" is replaced with "_".

Also moved some stuff around and added a dependency on "mock" for testing.