mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-16 16:16:43 +10:00
Merge pull request #4528 from akiva/master
Allow SSH keys to be of type ecdsa rather than only rsa and dsa (which are slower, older, and weaker)
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user