Skip to content

Disclosing critical information stored in $_SERVER #124

@olvlvl

Description

@olvlvl

Hi,

Exception handling tools such as filp/whoops are dumping $_SERVER, possibly disclosing critical information put there by phpdotenv. This is a security issue that could easily be fixed. What's the point in having this values in $_SERVER in the first place? If you setup environment variables properly they are not polluting $_SERVER. More over, environment variables should be read from $_ENV or obtained using getenv(), not $_SERVER although it may seem handy.

As an example when a run ICANBOOGIE_INSTANCE=dev php -S localhost:8000, ICANBOOGIE_INSTANCE is not in $_SERVER but can be read from $_ENV or obtained using getenv().

Your tool is introducing a double standard.

What do you think?

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