SessionId fix
This commit is contained in:
15
action.php
15
action.php
@@ -23,9 +23,8 @@ class action_plugin_botmon extends DokuWiki_Action_Plugin {
|
||||
|
||||
global $ACT;
|
||||
|
||||
// initialize the session id and type with random data:
|
||||
$this->sessionId = rand(1000000, 9999999);
|
||||
$this->sessionType = 'rnd';
|
||||
// populate the session id and type:
|
||||
$this->setSessionInfo();
|
||||
|
||||
// insert header data into the page:
|
||||
if ($ACT == 'show' || $ACT == 'edit' || $ACT == 'media') {
|
||||
@@ -62,8 +61,6 @@ class action_plugin_botmon extends DokuWiki_Action_Plugin {
|
||||
|
||||
global $INFO;
|
||||
|
||||
// populate the session id and type:
|
||||
$this->getSessionInfo();
|
||||
|
||||
// build the tracker code:
|
||||
$code = $this->getBMHeader();
|
||||
@@ -178,7 +175,7 @@ class action_plugin_botmon extends DokuWiki_Action_Plugin {
|
||||
return $country;
|
||||
}
|
||||
|
||||
private function getSessionInfo() {
|
||||
private function setSessionInfo() {
|
||||
|
||||
// what is the session identifier?
|
||||
if (isset($_SESSION)) {
|
||||
@@ -199,6 +196,12 @@ class action_plugin_botmon extends DokuWiki_Action_Plugin {
|
||||
$this->sessionId = $_SERVER['REMOTE_ADDR'];
|
||||
$this->sessionType = 'ip';
|
||||
}
|
||||
|
||||
if (!$this->sessionId) { /* if all fails, use random data */
|
||||
$this->sessionId = rand(100000000, 999999999);
|
||||
$this->sessionType = 'rnd';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function showCaptcha(Event $event) {
|
||||
|
||||
@@ -363,6 +363,7 @@
|
||||
&.typ_php::before { background-position-y: -40px }
|
||||
&.typ_ip::before { background-position-y: -60px }
|
||||
&.typ_usr::before { background-position-y: -80px }
|
||||
&.typ_rnd::before { background-position-y: -100px }
|
||||
|
||||
/* External link icons */
|
||||
&.extlink::before { background-image: url('img/links.png') }
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
{"id": "zenlayer", "name": "Zenlayer"}
|
||||
],
|
||||
"ranges": [
|
||||
{"from": "1.92.0.0", "to": "1.95.255.254", "m": 14, "g": "huawei"},
|
||||
{"from": "3.0.0.0", "to": "3.255.255.254", "m": 8, "g": "amazon"},
|
||||
{"from": "5.161.0.0", "to": "5.161.255.255", "m": 16, "g": "hetzner"},
|
||||
{"from": "8.128.0.0", "to": "8.191.255.254", "m": 10, "g": "alibaba"},
|
||||
@@ -67,6 +68,7 @@
|
||||
{"from": "138.121.0.0", "to": "138.121.225.254", "m": 16, "g": "misc_sa"},
|
||||
{"from": "142.147.128.0", "to": "1142.147.255.254", "m": 17, "g": "w2obj"},
|
||||
{"from": "146.174.128.0", "to": "146.174.191.254", "m": 18, "g": "huawei"},
|
||||
{"from": "149.232.128.0", "to": "149.232.159.254", "m": 19, "g": "huawei"},
|
||||
{"from": "150.40.128.0", "to": "150.40.255.254", "m": 17, "g": "huawei"},
|
||||
{"from": "159.138.0.0", "to": "159.138.225.254", "m": 16, "g": "huawei"},
|
||||
{"from": "162.128.0.0", "to": "162.128.255.254", "m": 16, "g": "zenlayer"},
|
||||
|
||||
BIN
img/captcha.png
BIN
img/captcha.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
img/idtyp.png
BIN
img/idtyp.png
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user