Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13974376
D7522.id16967.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.id16967.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
Oct 19 2024, 5:17 AM (4 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6715276
Default Alt Text
D7522.id16967.diff (983 B)
Attached To
Mode
D7522: Support ecdsa-sha2-nistp256 SSH keys
Attached
Detach File
Event Timeline
Log In to Comment