summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal.php
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2014-01-09 00:18:49 -0800
committerChris Buechler <cmb@pfsense.org>2014-01-09 00:18:49 -0800
commitf8d1587b6e2cd8441fa16733a02af25257fc7708 (patch)
treeb80bcb56fd3cea84a12d7d2d430094216b6abd3a /usr/local/www/services_captiveportal.php
parent51922cb793b83bf7d22fdaa47205fd59b4d70e87 (diff)
parente98daec5960b7ecdd18bc461003df3a18d2adbe7 (diff)
downloadpfsense-f8d1587b6e2cd8441fa16733a02af25257fc7708.zip
pfsense-f8d1587b6e2cd8441fa16733a02af25257fc7708.tar.gz
Merge pull request #882 from derelict-pf/cp-nohttpsforwards
Add checkbox and logic to disable forwarding HTTPS/SSL (Port 443)
Diffstat (limited to 'usr/local/www/services_captiveportal.php')
-rwxr-xr-xusr/local/www/services_captiveportal.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index a387ede..65d185f 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -106,6 +106,7 @@ if ($a_cp[$cpzone]) {
$pconfig['httpsname'] = $a_cp[$cpzone]['httpsname'];
$pconfig['preauthurl'] = strtolower($a_cp[$cpzone]['preauthurl']);
$pconfig['certref'] = $a_cp[$cpzone]['certref'];
+ $pconfig['nohttpsforwards'] = isset($a_cp[$cpzone]['nohttpsforwards']);
$pconfig['logoutwin_enable'] = isset($a_cp[$cpzone]['logoutwin_enable']);
$pconfig['peruserbw'] = isset($a_cp[$cpzone]['peruserbw']);
$pconfig['bwdefaultdn'] = $a_cp[$cpzone]['bwdefaultdn'];
@@ -283,6 +284,7 @@ if ($_POST) {
$newcp['bwdefaultdn'] = $_POST['bwdefaultdn'];
$newcp['bwdefaultup'] = $_POST['bwdefaultup'];
$newcp['certref'] = $_POST['certref'];
+ $newcp['nohttpsforwards'] = $_POST['nohttpsforwards'] ? true : false;
$newcp['logoutwin_enable'] = $_POST['logoutwin_enable'] ? true : false;
$newcp['nomacfilter'] = $_POST['nomacfilter'] ? true : false;
$newcp['noconcurrentlogins'] = $_POST['noconcurrentlogins'] ? true : false;
@@ -406,6 +408,7 @@ function enable_change(enable_change) {
document.iform.radmac_format.disabled = radius_endis;
document.iform.httpsname.disabled = https_endis;
document.iform.certref.disabled = https_endis;
+ document.iform.nohttpsforwards.disabled = https_endis;
document.iform.logoutwin_enable.disabled = endis;
document.iform.nomacfilter.disabled = endis;
document.iform.noconcurrentlogins.disabled = endis;
@@ -906,6 +909,13 @@ function enable_change(enable_change) {
</td>
</tr>
<tr>
+ <td valign="top" class="vncell"><?=gettext("Disable HTTPS forwards"); ?></td>
+ <td class="vtable">
+ <input name="nohttpsforwards" type="checkbox" class="formfld" id="nohttpsforwards" value="yes" <?php if ($pconfig['nohttpsforwards']) echo "checked"; ?>>
+ <strong><?=gettext("Disable HTTPS forwards"); ?></strong><br>
+ <?=gettext("If this option is set, attempts to connect to SSL/HTTPS (Port 443) sites will not be forwarded to the captive portal. This prevents certificate errors from being presented to the user even if HTTPS logins are enabled. Users must attempt a connecton to an HTTP (Port 80) site to get forwarded to the captive portal. If HTTPS logins are enabled, the user will be redirected to the HTTPS login page."); ?></td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Portal page contents"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input type="file" name="htmlfile" class="formfld file" id="htmlfile"><br>
OpenPOWER on IntegriCloud