diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php
index c51c073d45..1f35a57fe8 100755
--- a/usr/local/captiveportal/index.php
+++ b/usr/local/captiveportal/index.php
@@ -106,19 +106,6 @@ if ($clientmac && portal_mac_fixed($clientmac)) {
readfile("{$g['varetc_path']}/captiveportal-error.html");
}
-} else if ($_POST['accept'] && $config['captiveportal']['auth_method']=="local") {
- //check against local usermanager
-
- //erase expired accounts
- if(trim($config['users'][$_POST['auth_user']]['expirationdate'])!="" && strtotime("-1 day")>strtotime($config['users'][$_POST['auth_user']]['expirationdate'])){
- unset($config['users'][$_POST['auth_user']]);
- write_config();
- }
- if($config['users'][$_POST['auth_user']]['password']==md5($_POST['auth_pass'])){
- portal_allow($clientip, $clientmac,$_POST['auth_user'],0,0);
- } else {
- readfile("{$g['varetc_path']}/captiveportal-error.html");
- }
} else if ($_POST['accept'] && $clientip) {
//KEYCOM: authorised up and down bandwidth defaults (set from webgui). If not set, use 128/128
if (isset($config['captiveportal']['peruserbw'])) {
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc
index 09571c9dfc..76a1238045 100755
--- a/usr/local/www/fbegin.inc
+++ b/usr/local/www/fbegin.inc
@@ -99,7 +99,6 @@ function showhide(tspan, tri) {
SNMP
Proxy ARP
Captive portal
- User Manager
Wake on LAN
VPN
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 63b47b8e9d..01459fac9e 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -1,22 +1,22 @@
#!/usr/local/bin/php
-.
All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
-
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
-
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -50,7 +50,6 @@ $pconfig['cinterface'] = $config['captiveportal']['interface'];
$pconfig['timeout'] = $config['captiveportal']['timeout'];
$pconfig['idletimeout'] = $config['captiveportal']['idletimeout'];
$pconfig['enable'] = isset($config['captiveportal']['enable']);
-$pconfig['auth_method'] = $config['captiveportal']['auth_method'];
$pconfig['radacct_enable'] = isset($config['captiveportal']['radacct_enable']);
$pconfig['httpslogin_enable'] = isset($config['captiveportal']['httpslogin']);
$pconfig['httpsname'] = $config['captiveportal']['httpsname'];
@@ -80,9 +79,9 @@ if ($_POST) {
if ($_POST['enable']) {
$reqdfields = explode(" ", "cinterface");
$reqdfieldsn = explode(",", "Interface");
-
+
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
-
+
/* make sure no interfaces are bridged */
for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
$coptif = &$config['interfaces']['opt' . $i];
@@ -91,7 +90,7 @@ if ($_POST) {
break;
}
}
-
+
if ($_POST['httpslogin_enable']) {
if (!$_POST['cert'] || !$_POST['key']) {
$input_errors[] = "Certificate and key must be specified for HTTPS login.";
@@ -101,13 +100,13 @@ if ($_POST) {
if (!strstr($_POST['key'], "BEGIN RSA PRIVATE KEY") || !strstr($_POST['key'], "END RSA PRIVATE KEY"))
$input_errors[] = "This key does not appear to be valid.";
}
-
+
if (!$_POST['httpsname'] || !is_domain($_POST['httpsname'])) {
$input_errors[] = "The HTTPS server name must be specified for HTTPS login.";
}
}
}
-
+
if ($_POST['timeout'] && (!is_numeric($_POST['timeout']) || ($_POST['timeout'] < 1))) {
$input_errors[] = "The timeout must be at least 1 minute.";
}
@@ -129,7 +128,6 @@ if ($_POST) {
$config['captiveportal']['timeout'] = $_POST['timeout'];
$config['captiveportal']['idletimeout'] = $_POST['idletimeout'];
$config['captiveportal']['enable'] = $_POST['enable'] ? true : false;
- $config['captiveportal']['auth_method'] = $_POST['auth_method'];
$config['captiveportal']['radacct_enable'] = $_POST['radacct_enable'] ? true : false;
$config['captiveportal']['httpslogin'] = $_POST['httpslogin_enable'] ? true : false;
$config['captiveportal']['httpsname'] = $_POST['httpsname'];
@@ -149,15 +147,15 @@ if ($_POST) {
$config['captiveportal']['radiusport'] = $_POST['radiusport'];
$config['captiveportal']['radiusacctport'] = $_POST['radiusacctport'];
$config['captiveportal']['radiuskey'] = $_POST['radiuskey'];
-
+
/* file upload? */
if (is_uploaded_file($_FILES['htmlfile']['tmp_name']))
$config['captiveportal']['page']['htmltext'] = base64_encode(file_get_contents($_FILES['htmlfile']['tmp_name']));
if (is_uploaded_file($_FILES['errfile']['tmp_name']))
$config['captiveportal']['page']['errtext'] = base64_encode(file_get_contents($_FILES['errfile']['tmp_name']));
-
+
write_config();
-
+
$retval = 0;
if (!file_exists($d_sysrebootreqd_path)) {
config_lock();
@@ -168,79 +166,19 @@ if ($_POST) {
}
}
?>
-
-
-
| onClick="enable_change(false)"> Enable captive portal | |||||||||||||||||||||||||||||
| Interface | |||||||||||||||||||||||||||||
| Hard timeout | -- + |
+
minutes Clients will be disconnected after this amount of time, regardless of activity. They may log in again immediately, though. Leave this field blank for no hard timeout (not recommended unless an idle timeout is set). |
|||||||||||||||||||||||||||
| Logout popup window | -+ |
>
Enable logout popup window If enabled, a popup window will appear when clients are allowed through the captive portal. This allows clients to explicitly disconnect themselves before the idle or hard timeout occurs. When RADIUS accounting is enabled, this option is implied. |
@@ -359,7 +278,7 @@ to access after they've authenticated.
|||||||||||||||||||||||||||
| Per-user bandwidth restriction |
- onClick="enable_peruserbw()">
+ >
Enable per-user bandwidth restriction
|