mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
bugfix: fix regular expression to leave port colon
This commit is contained in:
parent
0de7549a64
commit
a4c47e1cd7
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ class LinuxPorts < PortsInfo
|
||||||
def parse_net_address(net_addr, protocol)
|
def parse_net_address(net_addr, protocol)
|
||||||
if protocol.eql?('tcp6') || protocol.eql?('udp6')
|
if protocol.eql?('tcp6') || protocol.eql?('udp6')
|
||||||
# prep for URI parsing, parse ip6 port
|
# prep for URI parsing, parse ip6 port
|
||||||
ip6 = /^(\S+:)(\d+)$/.match(net_addr)
|
ip6 = /^(\S+):(\d+)$/.match(net_addr)
|
||||||
ip6addr = ip6[1]
|
ip6addr = ip6[1]
|
||||||
ip6addr = '::' if /^:::$/.match(ip6addr)
|
ip6addr = '::' if /^:::$/.match(ip6addr)
|
||||||
# build uri
|
# build uri
|
||||||
|
|
Loading…
Reference in a new issue