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
318 stars 212 forks source link

"ip" text box should be limited to 45 characters, not 32 characters, for IPv6 #5176

Closed Deltik closed 5 months ago

Deltik commented 5 months ago

Discussed in https://github.com/e107inc/e107/discussions/5175

Originally posted by **Jimmi08** January 23, 2024 Hi, I am creating only a discussion, not an issue because I am not able to test it on the latest GitHub version. Maybe later. I tried to approve a comment on my site and I couldn't because of the IP address. ![image](https://github.com/e107inc/e107/assets/5429548/a1e573a7-e298-4af4-a3d6-34382d992b82) Maybe somebody other has this problem too.

This is a bug, specifically on this line:

With the : separators and potential IPv4-mapped IPv6 addresses, the maximum length of an IPv6 address should be 45 characters, but the text box is incorrectly limited to 32 characters.

tgtje commented 5 months ago

common answer : 39 ; but using mapped ip4 too it should be 45.

Deltik commented 5 months ago

Good point, @tgtje. IPv4-mapped IPv6 addresses like 0000:0000:0000:0000:0000:ffff:127.000.000.001 are 45 characters.

I've updated the issue to reflect the proper character limit.