summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErmal Luçi <ermal.luci@gmail.com>2012-01-05 10:08:11 -0800
committerErmal Luçi <ermal.luci@gmail.com>2012-01-05 10:08:11 -0800
commit9a296f50e8a7cd9d1379c8be04bacb9b31d7bb78 (patch)
tree0e7e8f48384692cb656fb656bb3b6a8dec471987 /usr/local/www
parentf6f9f8152293ccd921715d94c609eddd196cf5cf (diff)
parentb3765f4c403c6e1a511ae640562f3c6ab67ed2cc (diff)
downloadpfsense-9a296f50e8a7cd9d1379c8be04bacb9b31d7bb78.zip
pfsense-9a296f50e8a7cd9d1379c8be04bacb9b31d7bb78.tar.gz
Merge pull request #24 from nunnione/master
Added support for MSCHAPv2, MSCHAPv1 and CHAP_MD5 to captive portal
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/services_captiveportal.php37
1 files changed, 35 insertions, 2 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 09aacb4..b1e9a6a 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -106,6 +106,7 @@ if (isset($cpzone) && $a_cp[$cpzone]) {
$pconfig['bwdefaultup'] = $a_cp[$cpzone]['bwdefaultup'];
$pconfig['nomacfilter'] = isset($a_cp[$cpzone]['nomacfilter']);
$pconfig['noconcurrentlogins'] = isset($a_cp[$cpzone]['noconcurrentlogins']);
+ $pconfig['radius_protocol'] = $a_cp[$cpzone]['radius_protocol'];
$pconfig['redirurl'] = $a_cp[$cpzone]['redirurl'];
$pconfig['radiusip'] = $a_cp[$cpzone]['radiusip'];
$pconfig['radiusip2'] = $a_cp[$cpzone]['radiusip2'];
@@ -268,6 +269,7 @@ if ($_POST) {
$newcp['logoutwin_enable'] = $_POST['logoutwin_enable'] ? true : false;
$newcp['nomacfilter'] = $_POST['nomacfilter'] ? true : false;
$newcp['noconcurrentlogins'] = $_POST['noconcurrentlogins'] ? true : false;
+ $newcp['radius_protocol'] = $_POST['radius_protocol'];
$newcp['redirurl'] = $_POST['redirurl'];
if (isset($_POST['radiusip']))
$newcp['radiusip'] = $_POST['radiusip'];
@@ -381,7 +383,10 @@ function enable_change(enable_change) {
document.iform.auth_method[0].disabled = endis;
document.iform.auth_method[1].disabled = endis;
document.iform.auth_method[2].disabled = endis;
- document.iform.auth_method[3].disabled = endis;
+ document.iform.radius_protocol[0].disabled = radius_endis;
+ document.iform.radius_protocol[1].disabled = radius_endis;
+ document.iform.radius_protocol[2].disabled = radius_endis;
+ document.iform.radius_protocol[3].disabled = radius_endis;
document.iform.radmac_enable.disabled = radius_endis;
document.iform.httpslogin_enable.disabled = endis;
document.iform.radmac_format.disabled = radius_endis;
@@ -593,7 +598,35 @@ function enable_change(enable_change) {
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
- </table>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Radius Protocol"); ?></td>
+ <td width="78%" class="vtable">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td colspan="2"><input name="radius_protocol" type="radio" id="radius_protocol" value="PAP" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius" && $pconfig['radius_protocol']!="CHAP_MD5" && $pconfig['radius_protocol']!="MSCHAPv1" && $pconfig['radius_protocol']!="MSCHAPv2") echo "checked"; ?>>
+ <?=gettext("PAP"); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input name="radius_protocol" type="radio" id="radius_protocol" value="CHAP_MD5" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius" && $pconfig['radius_protocol']=="CHAP_MD5") echo "checked"; ?>>
+ <?=gettext("CHAP_MD5"); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input name="radius_protocol" type="radio" id="radius_protocol" value="MSCHAPv1" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius" && $pconfig['radius_protocol']=="MSCHAPv1") echo "checked"; ?>>
+ <?=gettext("MSCHAPv1"); ?></td>
+ </tr>
+ <tr>
+ <td colspan="2"><input name="radius_protocol" type="radio" id="radius_protocol" value="MSCHAPv2" onClick="enable_change(false)" <?php if($pconfig['auth_method']=="radius" && $pconfig['radius_protocol']=="MSCHAPv2") echo "checked"; ?>>
+ <?=gettext("MSCHAPv2"); ?></td>
+ </tr><tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </tr><tr>
+ <td>&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td colspan="2" valign="top" class="optsect_t2"><?=gettext("Primary RADIUS server"); ?></td>
OpenPOWER on IntegriCloud