Skip to content

Captive portal /access plain HTTP redirection timeout with Unifi web-auth #8602

@mvalois

Description

@mvalois

Packetfence 13.2 & Unifi Controller 8.3.32

We've noticed that plain HTTP captive portal redirection /access?lang= timeouts when used with Unifi and Firefox or any web browser that is not in « HTTPS only » mode.

To reproduce, configure Unifi with external captive portal in « Secure mode » and guest isolation.

In this mode Unifi allows only HTTPS requests to packetfence so the plain HTTP request timeouts.

As a workaround, configure web browser to use HTTPS only mode so browser upgrades HTTPS from original HTTP request.

The problem persists for integrated browser for Android (from wifi menu portal detection) and there is no workaround.

We've edited the file html/captive-portal/lib/captiveportal/PacketFence/DynamicRouting/Module/Root.pm, line 90, and changed

return $self->app->redirect("http://" . $self->app->request->header("host") . "/access?lang=$lang") unless($self->app->request->path eq "access");

to

return $self->app->redirect("https://" . $self->app->request->header("host") . "/access?lang=$lang") unless($self->app->request->path eq "access");

and it resolves the issue.

It looks like this bug has been introduced in this PR : #2393

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions