Skip to content

Conversation

@JTCunning
Copy link
Contributor

Fixes #3416.
cc @rdoursenaud / @getsentry/infrastructure

# Take just the first one.
real_ip = real_ip.split(",")[0]
if ':' in real_ip:
if '.' in real_ip and ':' in real_ip:
Copy link
Contributor

@mattrobenolt mattrobenolt Jun 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we switch these around?

To if ':' in real_ip and '.' in real_ip: since it'll be a tad faster for the common case where : doesn't exist.

@mattrobenolt
Copy link
Contributor

🍪

@JTCunning JTCunning merged commit 0311066 into master Jun 6, 2016
@JTCunning JTCunning deleted the GH-3416 branch June 6, 2016 18:05
mattrobenolt pushed a commit that referenced this pull request Jun 6, 2016
* Add a period to the IP checker to ensure it only finds IPv4.

* Add a test case for both IP versions.

* IPv4 is still the most popular but it's 2016. :sadface:
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Audit log crash on IPv6

3 participants