diff options
author | Ermal <eri@pfsense.org> | 2013-05-28 08:26:25 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-05-28 08:26:51 +0000 |
commit | 368d34c31aed69fe5f0c44814367a2658f4b4bc0 (patch) | |
tree | d1393a447b2b0c4a657c30f1d8b10a220d1b5b22 /usr | |
parent | 5bf53285961945e8168b54fada99bbd206a9e764 (diff) | |
download | pfsense-368d34c31aed69fe5f0c44814367a2658f4b4bc0.zip pfsense-368d34c31aed69fe5f0c44814367a2658f4b4bc0.tar.gz |
Fixes #3001, Check the protocol of the webgui to determine if https is being used for custom ports.
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/services_captiveportal_vouchers.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php index c2f154f..4490b1b 100644 --- a/usr/local/www/services_captiveportal_vouchers.php +++ b/usr/local/www/services_captiveportal_vouchers.php @@ -274,7 +274,12 @@ if ($_POST) { $newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) { // Synchronize the voucher DB from the master node require_once("xmlrpc.inc"); - if($newvoucher['vouchersyncport'] == "443") + + $protocol = "http"; + if (is_array($config['system']) && is_array($config['system']['webgui']) && !empty($config['system']['webgui']['protocol']) && + $config['system']['webgui']['protocol'] == "https") + $protocol = "https"; + if ($protocol == "https" || $newvoucher['vouchersyncport'] == "443") $url = "https://{$newvoucher['vouchersyncdbip']}"; else $url = "http://{$newvoucher['vouchersyncdbip']}"; |