Commit 5dbe94dc authored by Ciro Santilli's avatar Ciro Santilli

Simplify SSH fingerprint regexp extraction

[\d\h] is the same as \h
parent c8bb1716
...@@ -89,7 +89,7 @@ class Key < ActiveRecord::Base ...@@ -89,7 +89,7 @@ class Key < ActiveRecord::Base
end end
if cmd_status.zero? 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 self.fingerprint = match
end end
end end
......
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