News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[for the devs] IPs v6 truncated in the DB

Started by man.of.earth, May 02, 2022, 14:09:38 PM

Previous topic - Next topic

man.of.earth

Hello developers,

I noticed that the IPs are truncated in the database, in #__virtuemart_orders table, ip_address column, as its length is set to char(15) (supports only IPs v4). To remedy this, its length should be set to at least 39, or better 45 if mapped (see https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address ).

I guess the maskIP routine should also be modified/updated a bit, as the last group of digits for IPs v6 is 4 in length (compared to 3 for the IPs v4).

hazael

You can force ipv4 to be used on the server. Ipv4 is easier to control (it is less scalable than ipv6), which will increase your security.

man.of.earth

I don't wanna do that (it would defeat the purpose IPv6 exists for).

I usually do a backup of the tables that contain IP column and restore them after upgrade...