From 77058044de8ed03e88c47dbc48e64cfe31a48024 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 14 Sep 2010 12:56:25 +0200 Subject: FunnyDot: make the default hash harder to guess --- extensions/FunnyDot.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/FunnyDot.php b/extensions/FunnyDot.php index bf8dab77..320889ac 100644 --- a/extensions/FunnyDot.php +++ b/extensions/FunnyDot.php @@ -29,9 +29,9 @@ $wgSpecialPages['FunnyDotImage'] = 'SpecialFunnyDotImage'; class FunnyDot { private static function getFunnyDot() { - global $wgFunnyDotHash, $wgScript; + global $IP, $wgFunnyDotHash, $wgScript; - !isset($wgFunnyDotHash) && $wgFunnyDotHash = ''; + !isset($wgFunnyDotHash) && $wgFunnyDotHash = $IP; $time = time(); $hash = substr(sha1($time.$wgFunnyDotHash), 0, 4); @@ -43,11 +43,11 @@ private static function getFunnyDot() { } private static function checkFunnyDot() { - global $wgFunnyDotHash, $wgFunnyDotTimeout, $wgFunnyDotWait; + global $IP, $wgFunnyDotHash, $wgFunnyDotTimeout, $wgFunnyDotWait; # set some sane defaults # can be overridden in LocalSettings.php - !isset($wgFunnyDotHash) && $wgFunnyDotHash = ''; + !isset($wgFunnyDotHash) && $wgFunnyDotHash = $IP; !isset($wgFunnyDotTimeout) && $wgFunnyDotTimeout = 3600; !isset($wgFunnyDotWait) && $wgFunnyDotWait = 2; -- cgit v1.2.2