From 65598f01b3f6af6e879f50afd33ec3416bc06075 Mon Sep 17 00:00:00 2001 From: mdima Date: Fri, 23 Mar 2012 08:54:57 +0100 Subject: File Manager: Makes the download authentication work with version 1.2.3 and 2.0. --- config/filemgr/rbfminc/download.tmp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'config') 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']; -- cgit v1.2.3