e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
322 stars 214 forks source link

IPs v4 and v6 #600

Closed willem010 closed 9 years ago

willem010 commented 10 years ago

When looking at a problem yesterday i noticed 2 different types of IPs in the database.

the ban list contain both ip v4 and v6 ips. the users now have v6 IP's but show up in the logs as IPv4. (makes it hard to find the user)

an option to find a user on his IP would be nice here too. (this now doesnt work for v6 adresses?) search ip

e107steved commented 10 years ago

All IP addresses should be stored in the log as IP6 addresses - its only during display that they are converted to IP4 if appropriate. (Its possible to tweak a file to display all IP addresses in IP6 format).

Probably the search address needs checking, and converting to IP6 format before the search.

willem010 commented 10 years ago

i've checked the database and find both v4 and v6 in there v6 for the new records, but the old ones are still v4. probably a result of the upgrade going wrong?

willem010 commented 10 years ago

after my (now succesfull) upgrade, my tables still contain both v4 and v6 ip's (both user table and banlist table, probably more .. )

in the banlist this gives a few issues .. filtering on ip's does only work for v4 ips the records with v6 will not show in the results:

banlist: banlist filter 1

v4 search .. banlist filter - finds old ip

but v6 ips .. no result. (and there should be ;) ) banlist filter - but no v6

willem010 commented 10 years ago

here's a small bit banlist phpmyadmin of the banlist tabe itself.

e107steved commented 10 years ago

Understood. Looks like two fixes are required - firstly to convert the IP address format during an upgrade, and secondly to convert IPV4 filter values to IPV6 before searching

willem010 commented 10 years ago

btw, i've added an unique index on ip for my own database, preventing double records and making the ban list able to sort on ip faster. this helps a lot on my site. ;)

CaMer0n commented 9 years ago

@willem010 is this bug still an issue?

willem010 commented 9 years ago

yeah, that site still has that issue. and it will probably wil stay that way..

problem appeared when converting old site to v2.0 the old records are still in v4, the new ones are in v6.

if there was any conversion going on during upgrade, it failed at that time.. problem never got solved,

but this issue relates to the site whixh is no longer miine, so.. for me .. there is no issue :P lol

btw, most of my older pending issues relate to this site i left the issues open, thinking the issues need to be solved anyway. (except for the feature requests .. if you want me to close em.. just say so.. )

all my other e107 sites are working, but noting fancy there, most e107 features are unused,,( and the visitor load cannot be compared.)

CaMer0n commented 9 years ago

okay thanks. I'll close it for now, as it's most likely due to the timing of updates and database changes.