Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13986236
D7522.id16973.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
983 B
Referenced Files
None
Subscribers
None
D7522.id16973.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7522: Support ecdsa-sha2-nistp256 SSH keys
Attached
Detach File
Event Timeline
Log In to Comment