Commit f07c152b authored by Daniel Stone's avatar Daniel Stone Committed by Ana Rute Mendes
Browse files

HACK: OAuth: Accept Mattermost double-URI

Mattermost OAuth requires two separate URIs, whereas the Phabricator
OAuth server only allows returning to a single URI. Special case
Mattermost and get on with life.

The correct fix is to actually allow multiple values in the OAuth
configuration. I don't know off the top of my head how this would work,
e.g. a tokenising field, or a multi-line field (which I don't know how
to achieve without Remarkup), or ... ?
parent 661572ef
......@@ -246,7 +246,11 @@ final class PhabricatorOAuthServer extends Phobject {
// Both URIs must have the same path
if ($secondary_uri->getPath() != $primary_uri->getPath()) {
return false;
// ... but Mattermost wants two (very predictable) URIs. Ugh.
if ($primary_uri->getPath() == '/login/phabricator/complete' &&
$secondary_uri->getPath() != '/signup/phabricator/complete') {
return false;
// Both URIs must have the same port
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment