Skip to content

identify remote webseer servers by their connection address #72

Description

@somethingwithproof

remote.php authorizes the server-to-server actions (heartbeat, host-down log, enable/disable and add/update URL) by comparing the caller's IP to the registered plugin_webseer_servers. It read that IP from the X-Forwarded-For header before falling back to REMOTE_ADDR.
A forwarded header is set by the client, so it should not be trusted to identify the peer. This switches the comparison to REMOTE_ADDR, the real connection address.
No behaviour change for direct server-to-server connections. If a deployment fronts these servers with a trusted proxy, the proxy address is now what's matched (the intended, non-spoofable behaviour). php -l and php-cs-fixer clean.


Tracking issue for #71, which carries the fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions