ipv6 ip of user doesn't go into MySQL database #1782
Comments
|
from a security point of view, keep in mind that ipv6 addresses have a prefix and a suffix. there are multiple different ipv6 representations to go along. |
|
I think the problem is : with your example, we maybe try to add '[' and ']' characters onto database too (maybe? we need to do some tests about that) Take a look into : By the way, it seems we can have a problem when the type is ipv4 mapped ipv6, we could have : Thanks for the report, we'll update this issue when we have some news |
|
i've got some new flashy regex that can be used. the output of the the output of the the wanted output will be in regex match group 1. |
Why keep 15 (!) Bytes for storing ip in the base for storing ipv4, when you can fit into a blob in 4 (5, taking into account the header of the ip version). It's the same with ipv6. |
|
@cofob Good point. I considered something like that too. The same procedure applies to the UUID. However there multiple downsides to this approach, that's likely also the reason it wasn't implemented. The most obvious one is that database administrators can't read a binary IP. There are users that inspect the database, search for entries, edit them, etc. This could be on a PHPMyAdmin instance or something else. Handling binary data requires to manually convert them during a query Personally I didn't looked into the matter much. So it's still open whether the user could edit the data then and how portable this solution is for other SQL stores. |
|
Please fix this |


error while trying to store ipv6 address for authenticated user into a MySQL database.
for example, a user may join with an ipv6 address of
[d82e:b902:18db:2bf3:9f59:cfda:75af:8584], compared to an example ipv4 address of54.175.226.192, the address is different in size and formatting.Versions:
AuthMeReloaded v5.4.0 (build: 1877)
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper
The text was updated successfully, but these errors were encountered: