1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 07:42:40 +01:00
phorge-phorge/src/applications/files
epriestley f9836cb646 Scramble file secrets when related objects change policies
Summary:
Ref T10262. Files have an internal secret key which is partially used to control access to them, and determines part of the URL you need to access them. Scramble (regenerate) the secret when:

  - the view policy for the file itself changes (and the new policy is not "public" or "all users"); or
  - the view policy or space for an object the file is attached to changes (and the file policy is not "public" or "all users").

This basically means that when you change the visibility of a task, any old URLs for attached files stop working and new ones are implicitly generated.

Test Plan:
  - Attached a file to a task, used `SELECT * FROM file WHERE id = ...` to inspect the secret.
  - Set view policy to public, same secret.
  - Set view policy to me, new secret.
  - Changed task view policy, new secret.
  - Changed task space, new secret.
  - Changed task title, same old secret.
  - Added and ran unit tests which cover this behavior.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10262

Differential Revision: https://secure.phabricator.com/D15641
2016-04-06 14:14:16 -07:00
..
action Rate limit outbound requests in Macros 2015-03-26 11:11:52 -07:00
application Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
applicationpanel Allow diffusion.filecontentquery to load data for arbitrarily large files 2016-01-21 09:52:43 -08:00
builtin Add a map marker icon for Milestones 2016-02-05 13:40:52 -08:00
capability Add default policy to Files application 2014-11-21 11:17:20 -08:00
conduit Add support for temporary files to file.allocate 2015-09-04 10:34:32 -07:00
config Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
controller Update Files to new UI 2016-04-05 15:58:27 -07:00
edge Modernize remaining edge types 2015-01-03 10:58:20 +11:00
editor Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
engine Swap S3 to first-party client 2016-01-10 07:55:27 -08:00
exception Give users an explicit error if they try to upload a too-large diff to Differential 2016-01-08 18:53:33 -08:00
garbagecollector Provide bin/garbage for interacting with garbage collection 2015-10-02 09:17:24 -07:00
iconset Convert all calls to 'IconFont' to just 'Icon' 2016-01-27 20:59:27 -08:00
lipsum Improve bin/lipsum UX 2015-12-24 09:06:35 -08:00
mail phtize all the things 2015-05-22 21:16:39 +10:00
management Swap S3 to first-party client 2016-01-10 07:55:27 -08:00
markup Don't drop "phabricator-remarkup-embed-image" class from Remarkup images with width or height 2016-01-09 15:40:45 -08:00
phid Mark PhabricatorPHIDType::getPHIDTypeApplicationClass() as abstract 2015-11-03 06:47:12 +11:00
query Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
storage Scramble file secrets when related objects change policies 2016-04-06 14:14:16 -07:00
temporarytoken Convert one-time file access tokens to modular token types 2016-03-16 09:34:52 -07:00
transform Scale up small cover images instead of surrounding them with empty space 2016-02-06 16:09:38 -08:00
uploadsource Support pushing data into Git LFS 2016-03-18 09:36:34 -07:00
view phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorImageTransformer.php Extend from Phobject 2015-06-15 18:02:27 +10:00