Skip to content

Commit bc9eb09

Browse files
committed
Added RequireAuthToken(). Fixed a possible data input bug.
1 parent a752852 commit bc9eb09

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

extensions/1_security_token.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,16 @@ public function CanHandleRequest($method, $url, $path, $client)
5252
return false;
5353
}
5454

55+
// Nearly all extensions should return true. Since this is a security extension, it provides its own authentication mechanism.
56+
public function RequireAuthToken()
57+
{
58+
return false;
59+
}
60+
5561
public function ProcessRequest($method, $path, $client, &$data)
5662
{
5763
// Remove WebSocket connections.
58-
if ($method === false) return false;
64+
if ($method === false || !is_array($data)) return false;
5965

6066
if ($this->inittoken !== false)
6167
{

0 commit comments

Comments
 (0)