mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-03 01:17:41 +03:00
F #6669: Fix regexp to detect port ranges
Current version of the drivers does not check for user input to have the right format
This commit is contained in:
parent
0fde09b945
commit
8ff4b90453
@ -72,7 +72,7 @@ module VNMMAD
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user