Page MenuHomePhabricator

Correct an issue where "View Raw File" in Differential generated a file with overbroad permissions
ClosedPublic

Authored by epriestley on Mar 16 2017, 4:13 PM.
Tags
None
Referenced Files
F18782677: D17504.diff
Mon, Oct 13, 2:20 AM
F18755004: D17504.id42092.diff
Sun, Oct 5, 3:03 AM
F18743437: D17504.id42093.diff
Thu, Oct 2, 11:40 PM
F18741007: D17504.id42093.diff
Thu, Oct 2, 7:27 AM
F18733505: D17504.id.diff
Tue, Sep 30, 10:36 PM
F18678702: D17504.diff
Thu, Sep 25, 11:11 PM
F18639493: D17504.id.diff
Sep 17 2025, 2:03 PM
F18632935: D17504.diff
Sep 16 2025, 6:48 PM
Subscribers
None

Details

Summary

Via HackerOne. When you view a raw file in Differential, we currently generate a permanent file with default permissions. This may be incorrect: default permissions may be broader than the diff's permissions.

The other three methods of downloading/viewing raw files ("Download" in Diffusion and Differential, "View Raw" in Diffusion and Differential) already apply policies correctly and generate temporary files. However, this workflow was missed when other workflows were updated.

Beyond updating the workflow, delete any files we've generated in the past. This wipes the slate clean on any security issues and frees up a little disk space.

Test Plan
  • Ran migration script, saw existing files get purged.
  • Did "View Raw File", got a new file.
  • Verified that the file was temporary and properly attached to the diff, with "NO ONE" permissions.
  • Double-checked that Diffusion already runs policy logic correctly and applies appropriate policies.
  • Double-checked that "Download Raw Diff" in Differential already runs policy logic correctly.
  • Double-chekced that "Download Raw Diff" in Diffusion already runs policy logic correctly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable