Page MenuHomePhabricator

Phabricator Paste access permission weirdness after T120013 upgrade
Closed, ResolvedPublic

Description

So far I think this is not a security issue (see below) but definitely welcomes more investigation hence playing safe here and filing as a Sec task.

CC'ing @hoo who pinged me in a private message on IRC.
@hoo: If you could provide a specific example that would be georgeous!

  1. Go to https://phabricator.wikimedia.org/P2621 or https://phabricator.wikimedia.org/P2624 (if you're not their author)
  2. Get "Access Denied: Restricted File. You do not have permission to view this object."
  3. Go to https://phabricator.wikimedia.org/paste/
  4. See "P2621 SPARQL: Films that won most Academy Awards" listed and the content of its first five lines.
  5. Mention "P2621" on #wikimedia-tech
  6. Get: <stashbot> P2621 SPARQL: Films that won most Academy Awards - https://phabricator.wikimedia.org/P2621

Testing with P2629 which only @Aklapper and two other users can access, https://phabricator.wikimedia.org/paste/ lists P2629 when being logged in as @Aklapper, but it does not list P2629 when being logged in with my private account @Malyacko. Hence I hope there is just some misconfiguration.

Event Timeline

Looks like the issue is actually that viewing all others' pastes directly is broken?

Restricted Application changed the visibility from "Custom Policy" to "Custom Policy". · View Herald TranscriptFeb 18 2016, 4:14 PM
Restricted Application changed the edit policy from "All Users" to "Custom Policy". · View Herald Transcript

Looks like the issue is actually that viewing all others' pastes directly is broken?

I can view some logged in, also for example P2631 can be viewed logged out.

Okay, all others' pastes created before the upgrade?

It looks like pastes with restricted viewing policies (from both before and after the migration) are correctly not showing up in /paste, and are correctly not allowing users to view them directly. So yeah, it looks like the issue is viewing being restricted for public pastes prior to migration.

Should we make this public? Or does anyone think there is still a security issue here to address?

Seems like it should be public...

mmodell changed the visibility from "Custom Policy" to "Public (No Login Required)".
mmodell changed the edit policy from "Custom Policy" to "All Users".
mmodell changed Security from Software security bug to None.
mmodell claimed this task.

I talked to Evan and he wrote a migration to fix things.

Resolved by applying https://secure.phabricator.com/rP03d6e7f1b699d89c829e92ba0da2178b41ad1d6a