@sn0w@cofe.rocks now emoji from puni's instance aren't coming in because they are IPv4 only and apparently whatever library misskey used considers IPv4 mapped to IPv6 as "private IP" and blocks it :neofox_googly_shocked:
Conversation
Notices
-
Embed this notice
johann150@genau.qwertqwefsday.eu's status on Wednesday, 24-Jan-2024 04:30:37 JST Johann150 -
Embed this notice
sn0w :ad: (sn0w@cofe.rocks)'s status on Wednesday, 24-Jan-2024 04:30:36 JST sn0w :ad: @Johann150 misskey is truly the wooziest of the fedi impls :woozy_ai:
but guess thankfully you can just revert the mapped ip to regular v4 in the cacheLookup wrapper until node-fetch gets their stuff togetherHaelwenn /элвэн/ :triskell: likes this. -
Embed this notice
sn0w :ad: (sn0w@cofe.rocks)'s status on Wednesday, 24-Jan-2024 05:44:55 JST sn0w :ad: @Johann150 yknow
now that i think about it
that library using regex to detect private v6 ranges means if you write out some or all of the zeroes in the :: ffff: prefix it will fail the check
0:: ffff:1.2.3.4 should pass as public in this lib
:neocat_lul:
(ignore the awkward spacing, we have an ffff emoji and akkoma's markdown parser is NOT happy about that)Haelwenn /элвэн/ :triskell: likes this. -
Embed this notice
sn0w :ad: (sn0w@cofe.rocks)'s status on Wednesday, 24-Jan-2024 05:44:57 JST sn0w :ad: @Johann150 this is so painful to watch :neocat_googly_shocked:
consider yourself hugged -
Embed this notice
johann150@genau.qwertqwefsday.eu's status on Wednesday, 24-Jan-2024 05:44:59 JST Johann150 @sn0w@cofe.rocks aaaaah :neofox_googly_shocked: the deeper you look the worse it gets...
so in the config you can say that some CIDR ranges can bypass the private IP check. for parsing the CIDRs, another libary is used, which uses yet another completely different parser for IP addresses :neofox_googly_shocked: whyyyyyyyyyyyyyyyy
(yes ipaddr.js has a function to parse CIDRs of course, so add another item to the yak shaving pile) -
Embed this notice
johann150@genau.qwertqwefsday.eu's status on Wednesday, 24-Jan-2024 05:45:01 JST Johann150 @sn0w@cofe.rocks looking at the history of that library didnt exactly make my confidence go up so probably better not to use it any more...
-
Embed this notice
sn0w :ad: (sn0w@cofe.rocks)'s status on Wednesday, 24-Jan-2024 05:45:03 JST sn0w :ad: @Johann150 looking at the lib rn, what the heck :neocat_googly_shocked: :neocat_googly_shocked: :neocat_googly_shocked: -
Embed this notice
johann150@genau.qwertqwefsday.eu's status on Wednesday, 24-Jan-2024 05:45:04 JST Johann150 @sn0w@cofe.rocks the library syuilo chose to use is private-ip which after looking into it looks like a huge mess. it imports a bunch of weird dependencies (there is a dev dependency on a nodejs implementatin of rm -rf? 🥴)
the best part is that it imports a library that it uses for IP address parsing and normalizing. but this library can already tell you whether the address is in a special reserved range.
so really what it would need to do to determine if an IP is "private" is to check if its in a weird reserved range or not. but instead it normalizes the IP and then puts it through all kind of funny regexes :neofox_googly_shocked: another part of the yac to be shaved i guess -
Embed this notice
johann150@genau.qwertqwefsday.eu's status on Wednesday, 24-Jan-2024 05:45:06 JST Johann150 @sn0w@cofe.rocks not using node-fetch, i'm using got (but thats the other part i'm theoretically refactoring out
-
Embed this notice