summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAugustin-FL <Augustin-FL@users.noreply.github.com>2018-10-05 17:13:54 +0200
committerRenato Botelho <renato@netgate.com>2018-10-09 15:02:35 -0300
commit63da30ffc34f9b609dd1d0b66d643c6f39477122 (patch)
tree70fa32413f40e85c1951a23d2a2b644eef0d27b1
parent176361d895933e282417038d79c4c9fe432782a0 (diff)
downloadpfsense-63da30ffc34f9b609dd1d0b66d643c6f39477122.zip
pfsense-63da30ffc34f9b609dd1d0b66d643c6f39477122.tar.gz
Only display "you are connected" if :
- Logout popup is disabled and no custom logout page is set - Logout popup is enabled and logout_id is missing (cherry picked from commit c857583bb95d6d787b3334e5775cfd7921d547fb)
-rw-r--r--src/usr/local/captiveportal/index.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr/local/captiveportal/index.php b/src/usr/local/captiveportal/index.php
index 4da45d1..68da018 100644
--- a/src/usr/local/captiveportal/index.php
+++ b/src/usr/local/captiveportal/index.php
@@ -63,7 +63,7 @@ $cpsession = captiveportal_isip_logged($clientip);
$ourhostname = portal_hostname_from_client_ip($clientip);
/* Automatically switching to the logout page requires a custom logout page to be present. */
if ((!empty($cpsession)) && (! $_POST['logout_id']) && (!empty($cpcfg['page']['logouttext']))) {
- /* if client already logged in so show logout page */
+ /* if client already connected and a custom logout page is set : show logout page */
$protocol = (isset($config['captiveportal'][$cpzone]['httpslogin'])) ? 'https://' : 'http://';
$logouturl = "{$protocol}{$ourhostname}/";
@@ -77,8 +77,9 @@ if ((!empty($cpsession)) && (! $_POST['logout_id']) && (!empty($cpcfg['page']['l
include("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html");
ob_flush();
return;
-} elseif (!empty($cpsession)) {
- /*If someone try to access captive portal page while already connected*/
+} elseif (!empty($cpsession) && (!isset($_POST['logout_id']) || !isset($config['captiveportal'][$cpzone]['logoutwin_enable']))) {
+ /* If client try to access captive portal page while already connected,
+ but no custom logout page does exist and logout popup is disabled */
echo gettext("You are connected.");
ob_flush();
return;
OpenPOWER on IntegriCloud