Commit 5afb16e4 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add ssh key validation

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