Differential D21765 Diff 51884 src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorAuthOneTimeLoginController.php
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
} | } | ||||
// NOTE: We need to CSRF here so attackers can't generate an email link, | // NOTE: We need to CSRF here so attackers can't generate an email link, | ||||
// then log a user in to an account they control via sneaky invisible | // then log a user in to an account they control via sneaky invisible | ||||
// form submissions. | // form submissions. | ||||
switch ($link_type) { | switch ($link_type) { | ||||
case PhabricatorAuthSessionEngine::ONETIME_WELCOME: | case PhabricatorAuthSessionEngine::ONETIME_WELCOME: | ||||
$title = pht('Welcome to Phabricator'); | $title = pht( | ||||
'Welcome to %s', | |||||
PlatformSymbols::getPlatformServerName()); | |||||
break; | break; | ||||
case PhabricatorAuthSessionEngine::ONETIME_RECOVER: | case PhabricatorAuthSessionEngine::ONETIME_RECOVER: | ||||
$title = pht('Account Recovery'); | $title = pht('Account Recovery'); | ||||
break; | break; | ||||
case PhabricatorAuthSessionEngine::ONETIME_USERNAME: | case PhabricatorAuthSessionEngine::ONETIME_USERNAME: | ||||
case PhabricatorAuthSessionEngine::ONETIME_RESET: | case PhabricatorAuthSessionEngine::ONETIME_RESET: | ||||
default: | default: | ||||
$title = pht('Log in to Phabricator'); | $title = pht( | ||||
'Log in to %s', | |||||
PlatformSymbols::getPlatformServerName()); | |||||
break; | break; | ||||
} | } | ||||
$body = array(); | $body = array(); | ||||
$body[] = pht( | $body[] = pht( | ||||
'Use the button below to log in as: %s', | 'Use the button below to log in as: %s', | ||||
phutil_tag('strong', array(), $target_user->getUsername())); | phutil_tag('strong', array(), $target_user->getUsername())); | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |