Page MenuHomePhabricator

Prevent mailing lists from being bin/auth recover'd
ClosedPublic

Authored by epriestley on Oct 24 2015, 1:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 6, 8:43 PM
Unknown Object (File)
Mon, Dec 2, 11:43 AM
Unknown Object (File)
Mon, Dec 2, 11:43 AM
Unknown Object (File)
Mon, Dec 2, 11:23 AM
Unknown Object (File)
Nov 19 2024, 6:50 AM
Unknown Object (File)
Nov 14 2024, 10:56 PM
Unknown Object (File)
Nov 11 2024, 4:20 AM
Unknown Object (File)
Nov 10 2024, 10:01 PM
Subscribers
None

Details

Summary

Fixes T9610.

  • We currently permit you to bin/auth recover users who can not establish web sessions (but this will never work). Prevent this.
  • We don't emit a tailored error if you follow one of these links. Tailor the error.

Even with the first fix, you can still hit the second case by doing something like:

  • Recover a normal user.
  • Make them a mailing list in the DB.
  • Follow the recovery link.

The original issue here was an install that did a large migration and set all users to be mailing lists. Normal installs should never encounter this, but it's not wholly unreasonable to have daemons or mailing lists with the administrator flag.

Test Plan
  • Tried to follow a recovery link for a mailing list.
  • Tried to generate a recovery link for a mailing list.
  • Generated and followed a recovery link for a normal administrator.

Screen Shot 2015-10-24 at 6.29.16 AM.png (797×1 px, 134 KB)

epriestley@orbital ~/dev/phabricator $ ./bin/auth recover tortise-list
Usage Exception: This account ("tortise-list") can not establish web sessions, so it is not possible to generate a functional recovery link. Special accounts like daemons and mailing lists can not log in via the web UI.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Prevent mailing lists from being bin/auth recover'd.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Oct 25 2015, 1:05 AM
This revision was automatically updated to reflect the committed changes.