Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
} | } | ||||
} | } | ||||
if (!$errors) { | if (!$errors) { | ||||
list($type, $body, $comment) = $parts; | list($type, $body, $comment) = $parts; | ||||
$recognized_keys = array( | $recognized_keys = array( | ||||
'ssh-dsa', | 'ssh-dsa', | ||||
'ssh-dss', | |||||
'ssh-rsa', | 'ssh-rsa', | ||||
'ecdsa-sha2-nistp256', | 'ecdsa-sha2-nistp256', | ||||
'ecdsa-sha2-nistp384', | |||||
'ecdsa-sha2-nistp521', | |||||
); | ); | ||||
if (!in_array($type, $recognized_keys)) { | if (!in_array($type, $recognized_keys)) { | ||||
$e_key = pht('Invalid'); | $e_key = pht('Invalid'); | ||||
$type_list = implode(', ', $recognized_keys); | $type_list = implode(', ', $recognized_keys); | ||||
$errors[] = pht('Public key should be one of: %s', $type_list); | $errors[] = pht('Public key should be one of: %s', $type_list); | ||||
} else { | } else { | ||||
$key->setKeyType($type); | $key->setKeyType($type); | ||||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |