summaryrefslogtreecommitdiff
path: root/app/models/key.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-12 14:42:35 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-07-12 14:42:35 +0300
commit518181697041c5111bb42ca2bfdc119e258d425e (patch)
treed02b7c6ff60f40fdec158b9d789e741c2c267b38 /app/models/key.rb
parente49ec46461ef033fb54c717378628a31bd33248b (diff)
parentd938486c3607dde357bf10f2d31b204290cdfd3f (diff)
downloadgitlab-ce-518181697041c5111bb42ca2bfdc119e258d425e.tar.gz
Merge branch 'master' into 6-0-dev
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 0f2fc45abc9..11c01242b15 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -24,7 +24,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