Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-12-04 18:31:12 +0300
committerCiro Santilli <ciro.santilli@gmail.com>2014-12-28 16:36:24 +0300
commit5dbe94dc9bda5deceb6957a7e757425874f448de (patch)
tree49e3b313f1286375eff4c58b750c735bf4f808f0 /app/models/key.rb
parentc8bb171664de94778d4e6eba7773596b265f9efb (diff)
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