summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-09-14 12:56:25 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-09-14 12:56:25 +0200
commit77058044de8ed03e88c47dbc48e64cfe31a48024 (patch)
tree4fb1eff66bf274435eb1928fec416860a8648bb8
parent0e8a0afedebf2b6df9f70e0ffe3d74765417b86e (diff)
FunnyDot: make the default hash harder to guess
-rw-r--r--extensions/FunnyDot.php8
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;