server icon indicating copy to clipboard operation
server copied to clipboard

Ipv6 support in buildServerUrl()

Open jessevz opened this issue 1 year ago • 2 comments

fixes #725

The current code didn't work in case of an ipv6 address. This is because the host name got parsed by using strpos($hostname, ":"). this goes perfectly fine for an ipv4 address. But when you have an ipv6 address that already contains multiple ":" characters this goes wrong. For example http://[201:a373:f940:2421:b2f2:6a91:86b7:5628]/api/server.php would become http://[201/api/server.php. I fixed it by using strrpos when the server is not at port 80 or 433. This way the last occurrence of ":" will be used which splits the hostname of the port.

jessevz avatar Sep 13 '24 15:09 jessevz

There is something wrong with the pr. you are also including some other commits it seems.

zyronix avatar Sep 13 '24 16:09 zyronix

ah yes i see its because i forked the main branch and i made a pull request for the dev branch and apparently the main branch has more commits than the dev branch. I could revert the commits but i dont know if it really matters because with this pull request the dev branch will be up to date again with the main branch.

jessevz avatar Sep 13 '24 18:09 jessevz

Can we check an merge this PR or do you want to revert the changes made for HashLists?

gluafamichl avatar Nov 06 '24 12:11 gluafamichl