Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site: GetUserIP() returns an IPv4 if present #1363

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Histidine91
Copy link
Member

This fixes a potential failure with site ban by IP, where it currently gets the IPv6 and tries to look for matching IPv4 bans.

(Alternatively lobby clients could be allowed to report IPv6 instead)

Fixes a failure with site ban by IP
@Licho1
Copy link
Member

Licho1 commented Dec 22, 2016

This returns IP address of the server instead of the IP address of the person who made the request. You are resolving empty string.

@Histidine91
Copy link
Member Author

Is there a way to access MvcApplication from ForumController? So forum ban check (e.g. here) can get the correct IP as well.

@Licho1
Copy link
Member

Licho1 commented Jan 2, 2017

ForumController has "Request" object in it, so it can extract data from it. This function could be written in some other place and take Request as an input parameter instead.

@Licho1
Copy link
Member

Licho1 commented Jan 14, 2017

I'm still not sure about this thing. Running DNS resolve will slow down the site a lot.
Option could be to simply disable IPv6 on the server.

@Licho1
Copy link
Member

Licho1 commented Feb 27, 2017

I think if it only checked ipv6 and not all it should be fine..
use something like here?
http://stackoverflow.com/questions/1932843/iis-request-userhostaddress-returning-ipv6-1-even-when-ipv6-disabled

@DeinFreund DeinFreund force-pushed the master branch 4 times, most recently from 8e07aab to 9d6ea62 Compare December 25, 2017 04:04
@DeinFreund DeinFreund force-pushed the master branch 2 times, most recently from 5225232 to 6f75389 Compare January 7, 2018 22:46
@DeinFreund DeinFreund force-pushed the master branch 12 times, most recently from ce1528b to 242f4d7 Compare February 16, 2019 14:34
@DeinFreund DeinFreund force-pushed the master branch 7 times, most recently from f3c5f37 to 5d70725 Compare May 17, 2020 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants