mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
fix CP login
This commit is contained in:
parent
b62380eaa4
commit
dd353569a4
@ -223,6 +223,7 @@ EOD;
|
||||
if ($loginok){
|
||||
captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"LOGIN");
|
||||
portal_allow($clientip, $clientmac,$_POST['auth_user']);
|
||||
portal_reply_page($redirurl, "redir", "Just redirect the user.");
|
||||
} else {
|
||||
captiveportal_logportalauth($_POST['auth_user'],$clientmac,$clientip,"FAILURE");
|
||||
portal_reply_page($redirurl, "error", $errormsg);
|
||||
|
||||
@ -154,7 +154,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
|
||||
else if (!empty($config['captiveportal'][$cpzone]['redirurl']))
|
||||
$my_redirurl = $config['captiveportal'][$cpzone]['redirurl'];
|
||||
|
||||
if(isset($config['captiveportal'][$cpzone]['logoutwin_enable']) && !$passthrumac) {
|
||||
if(isset($config['captiveportal'][$cpzone]['logoutwin_enable']) ) {
|
||||
$ourhostname = portal_hostname_from_client_ip($clientip);
|
||||
$protocol = (isset($config['captiveportal'][$cpzone]['httpslogin'])) ? 'https://' : 'http://';
|
||||
$logouturl = "{$protocol}{$ourhostname}/";
|
||||
@ -167,6 +167,7 @@ function portal_allow($clientip,$clientmac,$username,$password = null, $attribut
|
||||
include("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html");
|
||||
|
||||
} else {
|
||||
// TODO: remove? should be handled by login page
|
||||
portal_reply_page($my_redirurl, "redir", "Just redirect the user.");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user