X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcidr.cpp;h=8d199353db58d069a9e48ab628e5e6f21db756d7;hb=ce3ce6cd49e14f640a1cabfef9cf21a239dd961d;hp=a4a252a48cefcc25acb10a7c82736b5bac835bdf;hpb=6aaf7047297b739377e7d509cb914f32447fb281;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/cidr.cpp b/src/cidr.cpp index a4a252a48..8d199353d 100644 --- a/src/cidr.cpp +++ b/src/cidr.cpp @@ -19,8 +19,6 @@ */ -/* $Core */ - #include "inspircd.h" /* Match CIDR strings, e.g. 127.0.0.1 to 127.0.0.0/8 or 3ffe:1:5:6::8 to 3ffe:1::0/32 @@ -68,7 +66,7 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr const std::string::size_type per_pos = cidr_copy.rfind('/'); if ((per_pos == std::string::npos) || (per_pos == cidr_copy.length()-1) || (cidr_copy.find_first_not_of("0123456789", per_pos+1) != std::string::npos) - || (cidr_copy.find_first_not_of("0123456789.:") < per_pos)) + || (cidr_copy.find_first_not_of("0123456789abcdefABCDEF.:") < per_pos)) { // The CIDR mask is invalid return false; @@ -82,5 +80,3 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr return mask == mask2; } - -