Skip to content

phpldapadmin does not detect X-FORWARDED-PROTO headers as an indication of a secure connection #1

@gberche-orange

Description

@gberche-orange

When trying to run phpldapadmin behind a SSL-terminating load balancer such as AWS ELB, that assigns the X-FORWARDED-PROTO header, using an HTTPS connection, that phpldapadmin still displays a warning on the logiin page about being accessed in plain text, as it tests against $_SERVER['HTTPS']

Possible workarounds:

add the following to lib/common.php

if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
    $_SERVER['HTTPS']='on';
}

or include that same code into an auto-prepend-file http://www.php.net/manual/en/ini.core.php#ini.auto-prepend-file.

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