My-Little-Forum / mylittleforum

A simple PHP and MySQL based internet forum that displays the messages in classical threaded view (tree structure)
GNU General Public License v3.0
118 stars 47 forks source link

Unify the sizes of table columns for storing IP addresses #695

Closed auge8472 closed 4 months ago

auge8472 commented 4 months ago

Visitors of forums, who connects with a IPv6 network address to the specific instance encounters blank pages or an error page with HTTP-status 500. Because of the every when and then error (maany Internet users still receive IPv4 addresses from their access providers) it wasn't easy to get it.

In this PR the table column mlf2_useronline.ip, that causes the problem gets enlarged from a length of 15 bytes to a length of 128 bytes. Also the column type changes from char to varchar. Last but not least the column mlf2_logincontrol.ip, which until now has a size of up to 255 bytes, gets restricted to 128 bytes.

Doing this, all four columns in different tables with the purpose of storing IP addresses will have the same size and the same datatype.

This will fix #681

auge8472 commented 4 months ago

The changes for the upgrade are part of #680. Because of this, this PR can be merged as is.