Commit 88301d569544d8ee82a62c68399ef94779aaf64a

Authored by Akiva Levy
1 parent 0d285c1c

Allow ecdsa SSH keys

Update app/models/key.rb to permit SSH keys of type ecdsa rather than forcing dsa and rsa algorithms.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/key.rb
... ... @@ -22,7 +22,7 @@ class Key < ActiveRecord::Base
22 22 before_validation :strip_white_space
23 23  
24 24 validates :title, presence: true, length: { within: 0..255 }
25   - validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\Assh-.*\Z/ }, uniqueness: true
  25 + validates :key, presence: true, length: { within: 0..5000 }, format: { with: /\A(ssh|ecdsa)-.*\Z/ }, uniqueness: true
26 26 validate :fingerprintable_key
27 27  
28 28 delegate :name, :email, to: :user, prefix: true
... ...