Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

When using a reverse web proxy in front of Dynmap, canonical IPv6 format mismatch prevents user matching for web chat. #67

Open
mooinglemur opened this issue Jul 24, 2016 · 0 comments

Comments

@mooinglemur
Copy link

mooinglemur commented Jul 24, 2016

For example, Apache will forward my IPv6 address using the X-Forwarded-For header. From an IPv6 address, it would encode it in a form such as 2001:db8::1234, but Java's canonical representation of that same address would be 2001:db8:0:0:0:0:0:1234, and Minecraft/Dynmap can't match the logged-in user to the web user, even from the same IPv6 address.

This only happens when an IPv6 quad contains a zero, and Dynmap is trusting X-Forwarded-For (via the trusted-proxies setting in dynmap).

Perhaps the address(es) extracted from X-Forwarded-For could be Java-canoncialized before being stuffed into message.name so that the next block which checks the IP against logins will find matches.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant