Project

General

Profile

Actions

Bug #14598

closed

Link to view Captive Portal custom HTML page content does not work

Added by Volker Werbus 9 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Captive Portal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
SG-1100, amd64

Description

Hi PFSense developers,

we run about 200+ locations and recently updated around 50% of the locations to 2.7.0

We noticed that the link to view the portal page content is not working anymore - it leads back to the webinterface. However, the link to view the error page works fine.

This one does not work: https://xxxxxxxx.spdns.org/services_captiveportal.php?zone=zone_174&act=viewhtml

This one works properly: https://xxxxxxxx.spdns.org/services_captiveportal.php?zone=zone_174&act=viewerrhtml

Actions #1

Updated by Jim Pingle 9 months ago

  • Target version set to 2.8.0
  • Plus Target Version set to 23.09

Looks like the regex at source:src/usr/local/www/services_captiveportal.php#L73 isn't quite right. It won't match viewhtml as it is currently.

This diff might be a quick fix. I don't have a setup with custom HTML handy to test at the moment though.

diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php
index 19d44093de..9d03e38ced 100644
--- a/src/usr/local/www/services_captiveportal.php
+++ b/src/usr/local/www/services_captiveportal.php
@@ -788,7 +788,7 @@ if ($pconfig['page']['htmltext']) {
        $group->add(new Form_Button(
                'btnview',
                'View Page Contents',
-               '?zone=' . $cpzone . '&act=viewhtml',
+               '?zone=' . $cpzone . '&act=viewhtmlhtml',
                'fa-file-text-o'
        ))->addClass('btn btn-info btn-xs')->setAttribute("target", "_blank");

Actions #2

Updated by Volker Werbus 9 months ago

Jim,

yep, I can confirm: This fix works fine!

Best,

Volker

Actions #3

Updated by Jim Pingle 9 months ago

  • Assignee set to Jim Pingle
Actions #4

Updated by Jim Pingle 9 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Danilo Zrenjanin 9 months ago

  • Status changed from Feedback to Resolved

The patch fixes it.

I am marking this ticket resolved.

Actions #6

Updated by Jim Pingle 9 months ago

  • Subject changed from View portal page content - link not working to Link to view Captive Portal custom HTML page content does not work

Updating subject for release notes.

Actions #7

Updated by Jim Pingle 6 months ago

  • Target version changed from 2.8.0 to 2.7.1
Actions

Also available in: Atom PDF