Skip to content
Snippets Groups Projects
Commit 5afb16e4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Add ssh key validation

parent 8da05a4f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -10,6 +10,7 @@ class Key < ActiveRecord::Base
 
validates :key,
presence: true,
:format => { :with => /ssh-.{3} / },
length: { within: 0..5000 }
 
before_save :set_identifier
Loading
Loading
Loading
Loading
@@ -77,7 +77,7 @@ FactoryGirl.define do
title
key do
"""
AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=
"""
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment