Page MenuHomePhabricator

D7522.id16973.diff
No OneTemporary

D7522.id16973.diff

Index: src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
===================================================================
--- src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
+++ src/applications/settings/panel/PhabricatorSettingsPanelSSHKeys.php
@@ -81,9 +81,17 @@
if (!$errors) {
list($type, $body, $comment) = $parts;
- if (!preg_match('/^ssh-dsa|ssh-rsa$/', $type)) {
+
+ $recognized_keys = array(
+ 'ssh-dsa',
+ 'ssh-rsa',
+ 'ecdsa-sha2-nistp256',
+ );
+
+ if (!in_array($type, $recognized_keys)) {
$e_key = pht('Invalid');
- $errors[] = pht('Public key should be "ssh-dsa" or "ssh-rsa".');
+ $type_list = implode(', ', $recognized_keys);
+ $errors[] = pht('Public key should be one of: %s', $type_list);
} else {
$key->setKeyType($type);
$key->setKeyBody($body);

File Metadata

Mime Type
text/plain
Expires
Tue, Oct 22, 1:30 AM (3 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6715276
Default Alt Text
D7522.id16973.diff (983 B)

Event Timeline