Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Localhost check doesn't work correctly with IPV6 server name '::1' - results in Uncaught exception 'EpiTwitterException' #198

@alex-gonzalez

Description

@alex-gonzalez

When using the library on my local machine with IPV6 the check for localhost in EpiOAuth isn't triggered because $_SERVER['SERVER_ADDR'] is '::1'

I changed line 171 in EpiOAuth from:
if(isset($_SERVER ['SERVER_ADDR']) && !empty($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] != '127.0.0.1')

to:
if(isset($_SERVER ['SERVER_ADDR']) && !empty($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] != '127.0.0.1' && $_SERVER['SERVER_ADDR'] != '::1')

This may be useful to other developers working on their local machine and getting this exception.

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