diff options
author | Chris Buechler <cmb@pfsense.org> | 2015-08-15 23:58:09 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2015-08-15 23:58:09 -0500 |
commit | 0d8788110a27ab87ef4e6a4c0cc6ea148ff8b3ca (patch) | |
tree | 366be1ad6f20823ab4bc7b2b663e30d411eea20b /config/filemgr/rbfminc/download.tmp | |
parent | 368de2c92306ad2e19890c0d30d15cc968022232 (diff) | |
parent | cad6ed23f5dfb5145beaf4f224121c731fb1097c (diff) | |
download | pfsense-packages-0d8788110a27ab87ef4e6a4c0cc6ea148ff8b3ca.tar.gz pfsense-packages-0d8788110a27ab87ef4e6a4c0cc6ea148ff8b3ca.tar.bz2 pfsense-packages-0d8788110a27ab87ef4e6a4c0cc6ea148ff8b3ca.zip |
Merge pull request #995 from doktornotor/patch-9
Diffstat (limited to 'config/filemgr/rbfminc/download.tmp')
-rw-r--r-- | config/filemgr/rbfminc/download.tmp | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/config/filemgr/rbfminc/download.tmp b/config/filemgr/rbfminc/download.tmp deleted file mode 100644 index badc6d19..00000000 --- a/config/filemgr/rbfminc/download.tmp +++ /dev/null @@ -1,49 +0,0 @@ -<?php -include_once("auth.inc"); -include "functions.php"; -//Set the cache policy -ob_end_clean(); -header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); -header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); -//Gets the parameters -$_GET['file_name'] = urldecode($_GET['file_name']); -$_GET['p'] = urldecode($_GET['p']); -//Check Authentication -$candownload = false; -if (function_exists("session_auth")) - {//pfSense 2.X - $candownload = session_auth();} -else - {//pfSense 1.2.3 - $candownload = htpasswd_backed_basic_auth();} -if ($candownload) -{ - if($_GET['file_name'] and $_GET['p']){ - $filepath = $_GET['p'].$_GET['file_name']; - if(file_exists($filepath)){ - $type = wp_check_filetype($_GET['file_name']); - header('Content-type: ' . $type[$_GET['file_name']]); - header('Content-Disposition: attachment; filename="'.$_GET['file_name'].'"'); - header('Content-Length: ' . filesize($filepath)); - header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($filepath)).' GMT', true, 200); - flush(); - readfile($filepath); - exit; - } - else - { - echo("File not found"); - } - } - else - { - echo("File Unknown"); - } -} -else -{ - echo("Session Expired"); -} -?>
\ No newline at end of file |