diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-08-03 10:03:06 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-08-03 10:03:06 +0200 |
commit | a915f365139217ba985603181a7c7ceda3f1d9c6 (patch) | |
tree | ca71a25c06bb87c0c0103320734c9d4b020bbf05 /lib | |
parent | fd168425f0da4527204fd8a97f45b39db34c122f (diff) |
* fix ominous bug in Regexp::IP_ADDR
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/irc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 58e9f90a..1e1c56b0 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -493,8 +493,8 @@ class Regexp HEX_DIGITS = /#{HEX_DIGIT}+/ HEX_OCTET = /#{HEX_DIGIT}#{HEX_DIGIT}?/ DEC_OCTET = /[01]?\d?\d|2[0-4]\d|25[0-5]/ - DEC_IP_ADDR = /#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}.#{DEC_OCTET}/ - HEX_IP_ADDR = /#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}.#{HEX_OCTET}/ + DEC_IP_ADDR = /#{DEC_OCTET}\.#{DEC_OCTET}\.#{DEC_OCTET}\.#{DEC_OCTET}/ + HEX_IP_ADDR = /#{HEX_OCTET}\.#{HEX_OCTET}\.#{HEX_OCTET}\.#{HEX_OCTET}/ IP_ADDR = /#{DEC_IP_ADDR}|#{HEX_IP_ADDR}/ # IPv6, from Resolv::IPv6, without the \A..\z anchors |