Skip to content

Commit 98c5d64

Browse files
committed
Merge pull request pfsense#170 from bcyrill/cp_restart
Fix Captive Portal SSL
2 parents b7fb885 + 20789ec commit 98c5d64

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

etc/inc/captiveportal.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ function captiveportal_init_webgui_zone($cpcfg) {
476476
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal.conf");
477477

478478
/* fire up https instance */
479-
if (isset($cpcfg['httpslogin']) && $cpcfg['httpslogin'])
479+
if (isset($cpcfg['httpslogin']))
480480
$res = mwexec("/usr/local/sbin/lighttpd -f {$g['varetc_path']}/lighty-{$cpzone}-CaptivePortal-SSL.conf");
481481
}
482482

usr/local/www/services_captiveportal.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@
257257
$newcp['radmac_enable'] = $_POST['radmac_enable'] ? true : false;
258258
$newcp['radmac_secret'] = $_POST['radmac_secret'] ? $_POST['radmac_secret'] : false;
259259
$newcp['reauthenticateacct'] = $_POST['reauthenticateacct'];
260-
$newcp['httpslogin'] = $_POST['httpslogin_enable'] ? true : false;
260+
if (isset($_POST['httpslogin_enable']))
261+
$newcp['httpslogin'] = true;
262+
else
263+
unset($newcp['httpslogin']);
261264
$newcp['httpsname'] = $_POST['httpsname'];
262265
$newcp['preauthurl'] = $_POST['preauthurl'];
263266
$newcp['peruserbw'] = $_POST['peruserbw'] ? true : false;

0 commit comments

Comments
 (0)