diff options
author | Akiva Levy <akiva+github@sixthirteendesign.com> | 2013-07-11 02:19:52 +0400 |
---|---|---|
committer | Akiva Levy <akiva+github@sixthirteendesign.com> | 2013-07-11 02:19:52 +0400 |
commit | 88301d569544d8ee82a62c68399ef94779aaf64a (patch) | |
tree | 4c3cd66d791013b6a702a674e24e1f9de6921697 | |
parent | 0d285c1cb167c327992a860764d28780e25f7812 (diff) |
Allow ecdsa SSH keys
Update app/models/key.rb to permit SSH keys of type ecdsa rather than forcing dsa and rsa algorithms.
-rw-r--r-- | app/models/key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |