Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Fix IPv6 registration error #25

Merged

Conversation

ssoloff
Copy link
Member

@ssoloff ssoloff commented Jan 4, 2018

Fixes triplea-game/triplea#2603.

The ip2long() function cannot parse an IPv6 address. Thus, when a user registers using a public IPv6 address, the IP variable contains the value FALSE instead of an integer representing the IP address. This prevents the record from being inserted into the pending_validations table. However, due to improper error handling, the user still receives an email asking them to confirm their email address. Any attempt to verify the email address fails due to no corresponding record being present in the pending_validations table.

It was observed that we don't actually use the the IP address recorded in the pending_validations table. Therefore, the temporary fix employed in this commit is to simply set the IP address to zero for all registrations. A future change will remove this column from the database entirely.

The ip2long() function cannot parse an IPv6 address.  Thus, when a user
registers using a public IPv6 address, the IP variable contains the
value FALSE instead of an integer representing the IP address.  This
prevents the record from being inserted into the pending_validations
table.  However, due to improper error handling, the user still receives
an email asking them to confirm their email address.  Any attempt to
verify the email address fails due to no corresponding record being
present in the pending_validations table.

It was observed that we don't actually use the the IP address recorded
in the pending_validations table.  Therefore, the temporary fix employed
in this commit is to simply set the IP address to zero for all
registrations.  A future change will remove this column from the
database entirely.
Copy link
Member

@RoiEXLab RoiEXLab left a comment

Choose a reason for hiding this comment

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

I'm assuming after this has been deployed to production, this will be properly fixed?

@RoiEXLab RoiEXLab merged commit f678401 into triplea-game:master Jan 5, 2018
@ssoloff
Copy link
Member Author

ssoloff commented Jan 5, 2018

@RoiEXLab Yes, I'll eventually get around to removing the IP address column from the database schema.

@ssoloff ssoloff deleted the issue-2603-fix-ipv6-registration-error branch January 5, 2018 01:15
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.

MARTI diceserver (at least sometimes) fails to validate email-addresses
2 participants