museix33 / omapd

Automatically exported from code.google.com/p/omapd
GNU General Public License v3.0
0 stars 0 forks source link

omapd accepts non-canonicalized IP/MAC address formats, which is disallowed by the specification. #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Section 3.2.4 of IF-MAP 1.1r5 specifically requires IF-MAP servers to verify 
that IP addresses are in 
a canonicalized format.

Section 3.2.5 likewise specifies canonicalized requirements for MAC addresses.

Note that MAC addresses have additional requirements.  While IP addresses can 
have single digits in 
each octet, MAC addresses are required to be double-digit, separated by colons, 
and lowercase.

Here's an example of invalid data being accepted by omapd:

QPair(Identifier("MacAddress":"":"0:0") , 
Identifier("IpAddressIPv4":"":"1.1111") )  

Original issue reported on code.google.com by terry.si...@gmail.com on 17 May 2010 at 6:59

GoogleCodeExporter commented 8 years ago

Original comment by smat...@gmail.com on 17 May 2010 at 1:08

GoogleCodeExporter commented 8 years ago
What about using a  QHostAddress - as a quick scan-check for validity of the IP 
addresses upon recv from the client?  something like:

 QHostAddress fmtchk;  
 if (!fmtchk.setAddress( attrs.value("value").toString() ) ) 
    puke-error-back-to-client; 
 else
    carry on;

Would solve the IP one - but not the MAC one.  

Original comment by darren.l...@gmail.com on 14 Jul 2010 at 12:24

GoogleCodeExporter commented 8 years ago
IP (IPv4, IPv6) Addresses, MACs, and HITs are now validated according to the 
IF-MAP 2.0 Specification.

Original comment by smat...@gmail.com on 25 Sep 2011 at 8:57