Changeset View
Changeset View
Standalone View
Standalone View
scripts/ssh/ssh-exec.php
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | $user = id(new PhabricatorPeopleQuery()) | ||||
| ->withUsernames(array($user_name)) | ->withUsernames(array($user_name)) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| if (!$user) { | if (!$user) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Invalid username ("%s"). There is no user with this username.', | 'Invalid username ("%s"). There is no user with this username.', | ||||
| $user_name)); | $user_name)); | ||||
| } | } | ||||
| id(new PhabricatorAuthSessionEngine()) | |||||
| ->willServeRequestForUser($user); | |||||
| } else if (strlen($device_name)) { | } else if (strlen($device_name)) { | ||||
| if (!$remote_address) { | if (!$remote_address) { | ||||
| throw new Exception( | throw new Exception( | ||||
| pht( | pht( | ||||
| 'Unable to identify remote address from the %s environment '. | 'Unable to identify remote address from the %s environment '. | ||||
| 'variable. Device authentication is accepted only from trusted '. | 'variable. Device authentication is accepted only from trusted '. | ||||
| 'sources.', | 'sources.', | ||||
| 'SSH_CLIENT')); | 'SSH_CLIENT')); | ||||
| ▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines | |||||