Skip to content

port number not preserved in CurrentURL() during final two-factor redirect #9

Description

@mblauser

If using two-factor authentication on a non-default webserver port, the final redirect returns the user to the correct URL but missing the port number.

e.g. https://mywebserver.tld:8443/some_path/login.php

The function CurrentURL() existing within Utils.inc.php fails to consider non-default ports. Unless a better solution exists, I propose adding to line #154 of Utils.inc.php:

if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
$host = $host . ":" . $_SERVER['SERVER_PORT'];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions