Doc #71935 [Com]: FILTER_FLAG_NO_RES_RANGE is missing 100.64.0.0/10

From: Date: Mon, 22 Aug 2016 12:12:55 +0000
Subject: Doc #71935 [Com]: FILTER_FLAG_NO_RES_RANGE is missing 100.64.0.0/10
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13850@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71935&edit=1 ID: 71935 Comment by: jame2 at ceh dot ac dot uk Reported by: bbcan177 at gmail dot com Summary: FILTER_FLAG_NO_RES_RANGE is missing 100.64.0.0/10 Status: Open Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I think the documentation is missing a lot more IP addresses than given in the original bug report. 127.0.0.1 is the one that caught me out. The documentation says "Fails validation for the following reserved IPv4 ranges: 0.0.0.0/8, 169.254.0.0/16, 192.0.2.0/24 and 224.0.0.0/4." Compare this with the code for 5.6.25 if (flags & FILTER_FLAG_NO_RES_RANGE) { if ( (ip[0] == 0) || (ip[0] == 10) || (ip[0] == 100 && (ip[1] >= 64 && ip[1] <= 127)) || (ip[0] == 127) || (ip[0] == 169 && ip[1] == 254) || (ip[0] == 172 && (ip[1] >= 16 && ip[1] <= 31)) || (ip[0] == 192 && ip[1] == 0 && ip[2] == 0) || (ip[0] == 192 && ip[1] == 0 && ip[2] == 2) || (ip[0] == 192 && ip[1] == 88 && ip[2] == 99) || (ip[0] == 192 && ip[1] == 168) || (ip[0] == 198 && (ip[1] == 18 || ip[1] == 19)) || (ip[0] == 198 && ip[1] == 51 && ip[2] == 100) || (ip[0] == 203 && ip[1] == 0 && ip[2] == 113) || (ip[0] >= 224 && ip[0] <= 255) ) { RETURN_VALIDATION_FAILED } } Previous Comments: ------------------------------------------------------------------------ [2016-03-31 23:45:05] bbcan177 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/filter.filters.flags --- FILTER_FLAG_NO_RES_RANGE is missing 100.64.0.0/10 in the documentation. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71935&edit=1

« previous php.doc.bugs (#13850) next »