https://bugzilla.wikimedia.org/show_bug.cgi?id=66088

--- Comment #6 from Sam Reed (reedy) <s...@reedyboy.net> ---
From Brandon on gerrit:

The non-wf way would be:
                $originalLevel = error_reporting( E_ALL & ~E_WARNING );
                $raw = inet_pton( $ip );
                error_reporting( $originalLevel );
I'd also tend think we'd want to leave the warning in addCidr() (since this is
addresses from explicit admin config) and only suppress the noisy ones in
match().
Or, as mentioned in the bug comments, could fix it in the caller instead and
leave this alone.  It could be that the warnings are coming in via:
IP::isPublic( $ipchain[$i + 1] )
Around line ~1145 of includes/WebRequest.php.  Both that and the:
IP::isConfiguredProxy( $curIP )
just above it make use of IPSet::match under the hood, but $curIP (which is
iterating $ipchain ...) has been sanitized before the call, where as
$ipchain[$i + 1] has not.
(or it could be that the sanitize/canonicalize calls return null.  we could
perhaps bail early with false in match() if the input is a literal null)

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to