diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-09-14 12:56:25 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-09-14 12:56:25 +0200 |
commit | 77058044de8ed03e88c47dbc48e64cfe31a48024 (patch) | |
tree | 4fb1eff66bf274435eb1928fec416860a8648bb8 | |
parent | 0e8a0afedebf2b6df9f70e0ffe3d74765417b86e (diff) |
FunnyDot: make the default hash harder to guess
-rw-r--r-- | extensions/FunnyDot.php | 8 |
1 files 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; |