Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gpt
large_projects
gitlabhq1
Commits
a06d9a49
Commit
a06d9a49
authored
11 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Download
Email Patches
Plain Diff
More strict validation for SSH Key content
parent
e36372ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
app/models/key.rb
app/models/key.rb
+1
-1
No files found.
app/models/key.rb
View file @
a06d9a49
...
...
@@ -23,7 +23,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:
/ssh-.
{3}
/
},
uniqueness:
true
validates
:key
,
presence:
true
,
length:
{
within:
0
..
5000
},
format:
{
with:
/
\A
ssh-.
*\Z
/
},
uniqueness:
true
validate
:fingerprintable_key
delegate
:name
,
:email
,
to: :user
,
prefix:
true
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment