mirror of
https://gitlab.com/mojo42/Jirafeau.git
synced 2025-04-21 04:01:51 +02:00
[FEATURE] allow admin to not log users IP in Jirafeau
New option 'store_uploader_ip' set to true by default. closes #248 Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
This commit is contained in:
parent
b83af6c5d9
commit
beae768cc7
@ -181,6 +181,11 @@ $cfg['file_hash'] = 'md5';
|
||||
*/
|
||||
$cfg['litespeed_workaround'] = false;
|
||||
|
||||
/* Store uploader's IP along with 'link' file.
|
||||
* Depending of your legislation, you may have to adjust this parameter.
|
||||
*/
|
||||
$cfg['store_uploader_ip'] = true;
|
||||
|
||||
/* Required flag to test if the installation is already installed
|
||||
* or needs to start the installation script
|
||||
*/
|
||||
|
@ -680,7 +680,9 @@ function jirafeau_admin_list($name, $file_hash, $link_hash)
|
||||
echo t('EXPIRE') . ': ' . ($l['time'] == -1 ? '∞' : jirafeau_get_datetimefield($l['time'])) . '<br/>';
|
||||
echo t('ONETIME') . ': ' . ($l['onetime'] == 'O' ? 'Yes' : 'No') . '<br/>';
|
||||
echo t('UPLOAD_DATE') . ': ' . jirafeau_get_datetimefield($l['upload_date']) . '<br/>';
|
||||
echo t('ORIGIN') . ': ' . $l['ip'] . '<br/>';
|
||||
if (strlen($l['ip']) > 0) {
|
||||
echo t('ORIGIN') . ': ' . $l['ip'] . '<br/>';
|
||||
}
|
||||
echo '</td><td>';
|
||||
echo '<form method="post">' .
|
||||
'<input type = "hidden" name = "action" value = "download"/>' .
|
||||
|
17
script.php
17
script.php
@ -127,12 +127,18 @@ if (isset($_FILES['file']) && is_writable(VAR_FILES)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($cfg['store_uploader_ip']) {
|
||||
$ip = get_ip_address($cfg);
|
||||
} else {
|
||||
$ip = "";
|
||||
}
|
||||
|
||||
$res = jirafeau_upload(
|
||||
$_FILES['file'],
|
||||
isset($_POST['one_time_download']),
|
||||
$key,
|
||||
$time,
|
||||
get_ip_address($cfg),
|
||||
$ip,
|
||||
$cfg['enable_crypt'],
|
||||
$cfg['link_name_length'],
|
||||
$cfg['file_hash']
|
||||
@ -461,13 +467,20 @@ elseif (isset($_GET['init_async'])) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($cfg['store_uploader_ip']) {
|
||||
$ip = get_ip_address($cfg);
|
||||
} else {
|
||||
$ip = "";
|
||||
}
|
||||
|
||||
echo jirafeau_async_init(
|
||||
$_POST['filename'],
|
||||
$type,
|
||||
isset($_POST['one_time_download']),
|
||||
$key,
|
||||
$time,
|
||||
get_ip_address($cfg)
|
||||
$ip
|
||||
);
|
||||
}
|
||||
/* Continue an asynchronous upload. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user