Menu

Topic-icon Error Code: 1406. Data too long for column 'ip' at row 1

  • admin@famstam.nl
  • admin@famstam.nl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #8971 by admin@famstam.nl
Hi, I've been using Joomla 4 for a few weeks now. Some users are getting a 1406 error "data too long for column 'ip' on row 1. I checked the database for columns named 'ip'. It seems that the securitycheckpro_whitelist table is the most likely suspect in the database. Is it possible that (eg using IP6 addresses) the current column length in this table may be too short in some cases?

Joomla version: 4.0.4
SecurityCheckPro version: 3.4.3
Securitycheck Pro Update Database Version: 1.0.4

Regards
Ad
Attachments:

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #8976 by Jose
Hi Ad,

securitycheckpro_whitelist table is used only from backend when you add an ip to whitelist, so I think it's not causing the issue. But there are other tables to store dynamic blacklist and blacklist ips that could cause this issue, although the length of those fields should be enough to store ipv6 (in fact, this is working fine since many many versions ago).

Anyway launch the following queries from phpmyadmin or similar (replace #_ with your database prefix):
ALTER TABLE `#__securitycheckpro_dynamic_blacklist` CHANGE `ip` `ip` VARCHAR(128); ALTER TABLE `#__securitycheckpro_blacklist` CHANGE `ip` `ip` VARCHAR(128); ALTER TABLE `#__securitycheckpro_whitelist` CHANGE `ip` `ip` VARCHAR(128);

If you don't know how to do this send me administrative credentials to access to cpanel or phpmyadmin and i will do it.

Regards,
Jose

Please Log in or Create an account to join the conversation.

  • admin@famstam.nl
  • admin@famstam.nl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #8977 by admin@famstam.nl
Replied by admin@famstam.nl on topic Error Code: 1406. Data too long for column 'ip' at row 1
Thank you Jose, the lenghts of the ip columns where 26 characters. I altered them to 128 and awaite the reactions of the users...

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #8978 by Jose
You're welcome Ad! I hope this will work.

Regards,
Jose

Please Log in or Create an account to join the conversation.

  • admin@famstam.nl
  • admin@famstam.nl's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #8981 by admin@famstam.nl
Replied by admin@famstam.nl on topic Error Code: 1406. Data too long for column 'ip' at row 1
Hi Jose,

Because I initially did not search all tables properly for the field 'ip', I did not realize that there were more tables with that field.
With further searching I also found the table securitycheckpro_sessions. The length was set at 35 characters. The address of the problem user is indeed an IPv6 address and has 36 characters.
The other tables where I also changed the field to 128 characters are:
- securitycheckpro_rules_logs
- securitycheckpro_logs

It seems logical to me if in a next version all fields where IP addresses are used are expanded to a minimum length of 40 characters (so that IPv6 addresses can also be used for black and whitelisting).

Sincerely,
Ad

Please Log in or Create an account to join the conversation.

More
6 months 2 weeks ago #8982 by Jose
Hi Ad,

Yes, all those fields will be set to 128 in the next version.

Thanks for sharing this!

Regards,
Jose

Please Log in or Create an account to join the conversation.

Time to create page: 0.118 seconds
Powered by Kunena Forum

Login or Sign In