ratelimitfile : do not store more than 128 chars in filename
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5195 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -22,7 +22,7 @@ class ratelimitfile extends ratelimit
|
||||
public function set ($name)
|
||||
{
|
||||
$this->storageOK();
|
||||
$nameFile = rawurlencode ($name);
|
||||
$nameFile = substr (rawurlencode ($name), 0, 128);
|
||||
$file = $this->storageDir."/$nameFile";
|
||||
// Add the current timestamp
|
||||
$currentTimeStamp = microtime (true)."\n";
|
||||
@@ -71,7 +71,7 @@ class ratelimitfile extends ratelimit
|
||||
public function del ($name)
|
||||
{
|
||||
$this->storageOK();
|
||||
$nameFile = rawurlencode ($name);
|
||||
$nameFile = substr (rawurlencode ($name), 0, 128);
|
||||
$file = $this->storageDir."/$nameFile";
|
||||
if (file_exists ($file))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user