|
Server : Apache System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64 User : p141464 ( 418825) PHP Version : 7.4.33.12 Disable Function : NONE Directory : /html/relaunch-kmu/wp-content/plugins/knews/direct/ |
Upload File : |
<?php
global $Knews_plugin;
if ($Knews_plugin) {
if (! $Knews_plugin->initialized) $Knews_plugin->init();
//burakali patch inspired
if (ob_get_contents()) ob_clean();
//ob_start();
$filename = $Knews_plugin->get_safe('file');
if ($filename != '') {
$filename = str_replace('/','*', $filename);
$filename = str_replace('\\','*', $filename);
$filename = str_replace('..','*', $filename);
if ($file = @file_get_contents(KNEWS_DIR . '/tmp/' . $filename)) {
if (strpos($filename,'.csv') !== false) {
header('Content-type: text/csv');
header('Content-disposition: attachment;filename=' . $filename);
}
if (strpos($filename,'.png') !== false) {
header('Content-type: image/png');
}
echo $file;
/*burakali patch #2
echo ob_get_clean();*/
die();
}
}
}
header('HTTP/1.0 404 Not Found');
echo '<html><head><title>404 Not Found</title></head>';
echo "<body><h1>404 Not Found</h1>";
echo "The page that you have requested could not be found.</body>";
die();
?>