diff options
author | mdima <michele@nt2.it> | 2012-03-23 08:54:57 +0100 |
---|---|---|
committer | mdima <michele@nt2.it> | 2012-03-23 08:54:57 +0100 |
commit | 65598f01b3f6af6e879f50afd33ec3416bc06075 (patch) | |
tree | ead0e63ee0b1000c37b952208dcb0677da499120 /config/filemgr/rbfminc | |
parent | 337f1198886af05541232eebec5e68a32f5b0e54 (diff) | |
download | pfsense-packages-65598f01b3f6af6e879f50afd33ec3416bc06075.tar.gz pfsense-packages-65598f01b3f6af6e879f50afd33ec3416bc06075.tar.bz2 pfsense-packages-65598f01b3f6af6e879f50afd33ec3416bc06075.zip |
File Manager: Makes the download authentication work with version 1.2.3 and 2.0.
Diffstat (limited to 'config/filemgr/rbfminc')
-rw-r--r-- | config/filemgr/rbfminc/download.tmp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/config/filemgr/rbfminc/download.tmp b/config/filemgr/rbfminc/download.tmp index 57de029e..badc6d19 100644 --- a/config/filemgr/rbfminc/download.tmp +++ b/config/filemgr/rbfminc/download.tmp @@ -11,7 +11,14 @@ header("Pragma: no-cache"); $_GET['file_name'] = urldecode($_GET['file_name']); $_GET['p'] = urldecode($_GET['p']); //Check Authentication -if (session_auth()) +$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']; |