Skip IP::isInRange() test if input is not in CIDR notation
authorBryan Davis <bd808@wikimedia.org>
Wed, 13 Nov 2013 16:38:58 +0000 (09:38 -0700)
committerReedy <reedy@wikimedia.org>
Wed, 13 Nov 2013 20:44:34 +0000 (20:44 +0000)
commit354be95608aac6c1a5d638208b5e6ddc7ad95c96
tree1c9c02d93587a6ede9264668bc73cb0e9354bc5a
parent88e87b54d0eed0bd47cf02d496ac72945d0860a3
Skip IP::isInRange() test if input is not in CIDR notation

IP:isInRange() performs several moderately expensive tests via regular
expression matching that can cause unwanted load with a sufficiently
complicated runtime configuration. Check the $wgSquidServersNoPurge
value to see if it includes the CIDR mask separator token ('/') before
continuing on to perform those more expensive tests.

Follows up Ia81bed7d8b42a2d2b200a3ce45a74e3784cdca2a

Bug: 52829

Change-Id: Ia557cb54f3a1bf67c8282140ab748369faa83028
includes/DefaultSettings.php
includes/ProxyTools.php