Skip to content

Widen logindb IP columns to support IPv6 - #84

Open
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/ipv6-loglength
Open

MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/ipv6-loglength

Conversation

@MrKeiKun

Copy link
Copy Markdown
Collaborator

FluxCP logs $_SERVER['REMOTE_ADDR'] from the web request in several logindb tables (cp_loginlog, cp_pwchange, cp_resetpass, cp_emailchange, cp_ipbanlog), and this can be IPv6 even though Hercules itself is IPv4-only. The varchar(15) columns were sized for IPv4 only, causing truncation/failures on IPv6 addresses. This widens them to varchar(45) via new ALTER TABLE schema migrations.

Fixes #48

Thank @dastgirp

FluxCP's own access/change logs capture $_SERVER['REMOTE_ADDR'] from the
web request, which can be IPv6 regardless of Hercules (which is IPv4-only).
The varchar(15) columns were sized for IPv4 dotted-quad only and truncate
or fail on IPv6 addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ipv6 issue

1 participant