Page MenuHomePhabricator

Prevent mailing lists from being bin/auth recover'd

Authored by epriestley on Oct 24 2015, 1:35 PM.



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

rP Phabricator
Lint Not Applicable
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.