summaryrefslogtreecommitdiff
path: root/app/models/key.rb
diff options
context:
space:
mode:
authorAkiva Levy <akiva+github@sixthirteendesign.com>2013-07-10 15:19:52 -0700
committerAkiva Levy <akiva+github@sixthirteendesign.com>2013-07-10 15:19:52 -0700
commit88301d569544d8ee82a62c68399ef94779aaf64a (patch)
tree4c3cd66d791013b6a702a674e24e1f9de6921697 /app/models/key.rb
parent0d285c1cb167c327992a860764d28780e25f7812 (diff)
downloadgitlab-ce-88301d569544d8ee82a62c68399ef94779aaf64a.tar.gz
Allow ecdsa SSH keys
Update app/models/key.rb to permit SSH keys of type ecdsa rather than forcing dsa and rsa algorithms.
Diffstat (limited to 'app/models/key.rb')
-rw-r--r--app/models/key.rb2
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