From 5dbe94dc9bda5deceb6957a7e757425874f448de Mon Sep 17 00:00:00 2001 From: Ciro Santilli Date: Thu, 4 Dec 2014 16:31:12 +0100 Subject: Simplify SSH fingerprint regexp extraction [\d\h] is the same as \h --- app/models/key.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/key.rb') 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 -- cgit v1.2.3