Bug #1805

Captive portal - Portal page contents - View current page url is incorrect.

Added by Davy Moedbeck almost 2 years ago. Updated almost 2 years ago.

Status:Closed Start date:08/19/2011
Priority:Normal Due date:08/19/2011
Assignee:Davy Moedbeck % Done:

0%

Category:-
Target version:- Estimated time:0.10 hour
Affected version:All Affected Architecture:All

Description

In the http://pfsense.local/services_captiveportal.php file there is an incorrect part:

the lines 701 till 709 needs to be removed and line
<a href="" target="_new"></a>

needs to be replaced by:

<a href="?act=viewhtml" target="_blank"></a>

So it would be like:
701 -
702 - list($host) = explode(":", $_SERVER['HTTP_HOST']);
703 - if(isset($config['captiveportal']['httpslogin'])) {
704 - $href = "https://$host:8001";
705 - } else {
706 - $href = "http://$host:8000";
707 - }
708 - ?>

710 - <a href="" target="_new"></a>

710 + <a href="?act=viewhtml" target="_blank"></a>

I have verified this and its the same in todays snapchot "2.0-RC3 (i386) built on Thu Aug 18 18:44:11 EDT 2011" as on the development snapshot of today "2.1-DEVELOPMENT (i386) built on Thu Aug 18 18:44:11 EDT 2011".

included is a fixed file for the problem

services_captiveportal.php Magnifier - Fixed file: services_captiveportal.php (44.5 kB) Davy Moedbeck, 08/19/2011 08:09 am

History

#1 Updated by Davy Moedbeck almost 2 years ago

to be more specific: select line 700 - 710 and replace by:

        <?=$mandfldhtml;?><input type="file" name="htmlfile" class="formfld file" id="htmlfile"><br>
        <?php if ($config['captiveportal']['page']['htmltext']): ?>
        <a href="?act=viewhtml" target="_blank"><?=gettext("View current page"); ?></a>

PS: Excuse me for the mess in my first post. (its the first time i'm using this...).

#2 Updated by Chris Buechler almost 2 years ago

  • Status changed from New to Closed

duplicate of #1810

Also available in: Atom PDF