1
0
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:
Ruben S. Montero 2024-12-12 13:20:47 +01:00
parent 0fde09b945
commit 8ff4b90453
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -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)