mirror of
https://github.com/nokonoko/Uguu.git
synced 2024-01-06 13:35:15 +00:00
fix
This commit is contained in:
parent
751a97eda9
commit
e2c8b5721d
@ -147,9 +147,6 @@ class Upload extends Response
|
|||||||
$this->checkMimeBlacklist();
|
$this->checkMimeBlacklist();
|
||||||
$this->checkExtensionBlacklist();
|
$this->checkExtensionBlacklist();
|
||||||
// Continue
|
// Continue
|
||||||
case !$this->Connector->CONFIG['LOG_IP']:
|
|
||||||
$this->fingerPrintInfo['ip'] = null;
|
|
||||||
// Continue
|
|
||||||
}
|
}
|
||||||
if (!is_dir($this->Connector->CONFIG['FILES_ROOT'])) {
|
if (!is_dir($this->Connector->CONFIG['FILES_ROOT'])) {
|
||||||
throw new Exception('File storage path not accessible.', 500);
|
throw new Exception('File storage path not accessible.', 500);
|
||||||
@ -191,10 +188,14 @@ class Upload extends Response
|
|||||||
{
|
{
|
||||||
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
|
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
|
||||||
$USER_AGENT = filter_var($_SERVER['HTTP_USER_AGENT'], FILTER_SANITIZE_ENCODED);
|
$USER_AGENT = filter_var($_SERVER['HTTP_USER_AGENT'], FILTER_SANITIZE_ENCODED);
|
||||||
|
$ip = null;
|
||||||
|
if ($this->Connector->CONFIG['LOG_IP']) {
|
||||||
|
$ip = $_SERVER['REMOTE_ADDR'];
|
||||||
|
}
|
||||||
$this->fingerPrintInfo = [
|
$this->fingerPrintInfo = [
|
||||||
'timestamp' => time(),
|
'timestamp' => time(),
|
||||||
'useragent' => $USER_AGENT,
|
'useragent' => $USER_AGENT,
|
||||||
'ip' => $_SERVER['REMOTE_ADDR'],
|
'ip' => $ip,
|
||||||
'ip_hash' => hash('sha1', $_SERVER['REMOTE_ADDR'] . $USER_AGENT),
|
'ip_hash' => hash('sha1', $_SERVER['REMOTE_ADDR'] . $USER_AGENT),
|
||||||
'files_amount' => $files_amount,
|
'files_amount' => $files_amount,
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user