From 88301d569544d8ee82a62c68399ef94779aaf64a Mon Sep 17 00:00:00 2001 From: Akiva Levy Date: Wed, 10 Jul 2013 15:19:52 -0700 Subject: [PATCH] Allow ecdsa SSH keys Update app/models/key.rb to permit SSH keys of type ecdsa rather than forcing dsa and rsa algorithms. --- app/models/key.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/key.rb b/app/models/key.rb index 185aef46e9e..61b4838f884 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -22,7 +22,7 @@ class Key < ActiveRecord::Base before_validation :strip_white_space validates :title, presence: true, length: { within: 0..255 } - validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\Assh-.*\Z/ }, uniqueness: true + validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true validate :fingerprintable_key delegate :name, :email, to: :user, prefix: true