aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdima <michele@nt2.it>2012-03-23 00:55:31 -0700
committermdima <michele@nt2.it>2012-03-23 00:55:31 -0700
commit1155622afe7af09ef01ac9b97daf23224fd5487a (patch)
tree9056dc51761d253377228d64697a4ad43f71c280
parent6e0f9decd45316e5d9ee0a083c760e1ad28040c0 (diff)
parent65598f01b3f6af6e879f50afd33ec3416bc06075 (diff)
downloadpfsense-packages-1155622afe7af09ef01ac9b97daf23224fd5487a.tar.gz
pfsense-packages-1155622afe7af09ef01ac9b97daf23224fd5487a.tar.bz2
pfsense-packages-1155622afe7af09ef01ac9b97daf23224fd5487a.zip
Merge pull request #229 from mdima/master
File Manager: Makes the download authentication work with version 1.2.3 and 2.0.
-rw-r--r--config/filemgr/rbfminc/download.tmp9
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'];