diff options
-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 |