Skip to content

Commit

Permalink
F #6669: Fix regexp to detect port ranges
Browse files Browse the repository at this point in the history
Current version of the drivers does not check for user input to have the right format

(cherry picked from commit 8ff4b90)
  • Loading branch information
rsmontero committed Dec 12, 2024
1 parent c395b00 commit 2fcd9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/lib/nic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Nic < Hash
private

def range?(r)
return !r.to_s.match(/^\d+([,-]\d+)*$/).nil?
return !r.to_s.match(/^\d+(\s*[,-]\s*\d+)*$/).nil?
end

def range(r)
Expand Down

0 comments on commit 2fcd9a3

Please sign in to comment.