Error for installation running with Mysql / MariaDB
The varbinary(16)
is not big enough to insert the raw IP data (I think).
Example below with IPv4 address logged as converted IPv6 address:
[2020-01-27 14:43:41.32163] [13366] [info] [LDAP INFO] Authentication successful - Login: john, IP: ::ffff:X.X.22.232
[2020-01-27 14:44:37.01600] [13366] [error] [7a27717d] DBD::mysql::st execute failed: Data too long for column'ip' at row 1 at /var/www/lstu/lstu/script/../lib/Lstu/DB/Ban.pm line 210.
I switched to postgresql backend, which worked ok, but I think that storing in varbinary(16) the raw string is bound to fail with IPv6. From what I gathered, you would need to convert the address into its binary representation before inserting it into MySQL.