1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 19:02:41 +01:00
phorge-phorge/src/applications/files/storage
epriestley 0669abc5f0 Use a proper entropy source to generate file keys
Summary:
See T549. Under configurations where files are served from an alternate domain
which does not have cookie credentials, we use random keys to prevent browsing,
similar to how Facebook relies on pseudorandom information in image URIs (we
could some day go farther than this and generate file sessions on the alternate
domain or something, I guess).

Currently, we generate these random keys in a roundabout manner. Instead, use a
real entropy source and store the key on the object. This reduces the number of
sha1() calls in the codebase as per T547.

Test Plan: Ran upgrade scripts, verified database was populated correctly.
Configured alternate file domain, uploaded file, verified secret generated and
worked properly. Changed secret, was given 404.

Reviewers: jungejason, benmathews, nh, tuomaspelkonen, aran

Reviewed By: aran

CC: aran, epriestley

Differential Revision: 1036
2011-10-23 14:42:23 -07:00
..
base Phabricator file upload application. 2011-01-23 14:04:07 -08:00
file Use a proper entropy source to generate file keys 2011-10-23 14:42:23 -07:00
imagemacro Image macros for Phabricator! 2011-04-13 20:08:13 -07:00
proxyimage Restore image proxying to Remarkup 2011-05-03 18:49:06 -07:00
storageblob Allow Phabricator storage engines to be extended and configured 2011-07-21 16:44:24 -07:00
transformed Basic image thumbnailing 2011-05-27 09:33:33 -07:00