summaryrefslogtreecommitdiff
path: root/app/models/key.rb
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-12-04 16:31:12 +0100
committerCiro Santilli <ciro.santilli@gmail.com>2014-12-28 14:36:24 +0100
commit5dbe94dc9bda5deceb6957a7e757425874f448de (patch)
tree49e3b313f1286375eff4c58b750c735bf4f808f0 /app/models/key.rb
parentc8bb171664de94778d4e6eba7773596b265f9efb (diff)
downloadgitlab-ce-5dbe94dc9bda5deceb6957a7e757425874f448de.tar.gz
Simplify SSH fingerprint regexp extraction
[\d\h] is the same as \h
Diffstat (limited to 'app/models/key.rb')
-rw-r--r--app/models/key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/key.rb b/app/models/key.rb
index 095c73d8baf..65a426d1f8b 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -89,7 +89,7 @@ class Key < ActiveRecord::Base
end
if cmd_status.zero?
- cmd_output.gsub /([\d\h]{2}:)+[\d\h]{2}/ do |match|
+ cmd_output.gsub /(\h{2}:)+\h{2}/ do |match|
self.fingerprint = match
end
end