dimkr / tootik

A federated nanoblogging service with a Gemini frontend.
gemini://hd.206267.xyz
Apache License 2.0
96 stars 4 forks source link

unicode domains are not handled #10

Closed norayr closed 1 year ago

norayr commented 1 year ago

hello,

i was trying to follow user inky from xn--y9azesw6bu.xn--y9a3aq and i get 'failed to resolve, the request has failed, but may succeed if you try again in the future'

same happens if i use unicode representation, not punicode one.

dimkr commented 1 year ago

What kind of server is this, and why is it returning 403 with HTML body? Does it support ActivityPub?

EDIT: I was able to resolve a user from https://socialhome.network/ and it looks like ծմակուտ.հայ returns an Apache 403 page. Does federation with this particular instance work from other ActivityPub implementations?

Jun 28 00:19:47 localhost run-tootik[178124]: {"id":"https://xn--y9azesw6bu.xn--y9a3aq/user/inky","level":"info","msg":"Resolving user ID","path":"/users/resolve","time":"2023-06-28T00:19:47Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:19:47 localhost run-tootik[178124]: {"from":"https://hd.206267.xyz/user/apirat","level":"info","msg":"Sending request","time":"2023-06-28T00:19:47Z","url":"https://xn--y9azesw6bu.xn--y9a3aq/.well-known/webfinger?resource=acct:inky@xn--y9azesw6bu.xn--y9a3aq"}
Jun 28 00:19:48 localhost run-tootik[178124]: {"error":"Failed to fetch https://xn--y9azesw6bu.xn--y9a3aq/.well-known/webfinger?resource=acct:inky@xn--y9azesw6bu.xn--y9a3aq: Failed to send request to https://xn--y9azesw6bu.xn--y9a3aq/.well-known/webfinger?resource=acct:inky@xn--y9azesw6bu.xn--y9a3aq: 403, \u003c!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e403 Forbidden\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eForbidden\u003c/h1\u003e\n\u003cp\u003eYou don't have permission to access this resource.\u003c/p\u003e\n\u003chr\u003e\n\u003caddress\u003eApache Server at xn--y9azesw6bu.xn--y9a3aq Port 443\u003c/address\u003e\n\u003c/body\u003e\u003c/html\u003e\n","id":"https://xn--y9azesw6bu.xn--y9a3aq/user/inky","level":"warning","msg":"Failed to resolve user ID","path":"/users/resolve","time":"2023-06-28T00:19:48Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:20:15 localhost run-tootik[178124]: {"id":"https://hd.206267.xyz/user/https://xn--y9azesw6bu.xn--y9a3aq/u/inky","level":"info","msg":"Resolving user ID","path":"/users/resolve","time":"2023-06-28T00:20:15Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:20:15 localhost run-tootik[178124]: {"error":"Cannot resolve https://hd.206267.xyz/user/https://xn--y9azesw6bu.xn--y9a3aq/u/inky: no such local user","id":"https://hd.206267.xyz/user/https://xn--y9azesw6bu.xn--y9a3aq/u/inky","level":"warning","msg":"Failed to resolve user ID","path":"/users/resolve","time":"2023-06-28T00:20:15Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:22:33 localhost run-tootik[178124]: {"from":"https://hd.206267.xyz/user/apirat","level":"info","msg":"Sending request","time":"2023-06-28T00:22:33Z","url":"https://%D5%AE%D5%B4%D5%A1%D5%AF%D5%B8%D6%82%D5%BF.%D5%B0%D5%A1%D5%B5/.well-known/webfinger?resource=acct:inky@ծմակուտ.հայ"}
Jun 28 00:22:33 localhost run-tootik[178124]: {"error":"Failed to fetch https://ծմակուտ.հայ/.well-known/webfinger?resource=acct:inky@ծմակուտ.հայ: Failed to send request to https://%D5%AE%D5%B4%D5%A1%D5%AF%D5%B8%D6%82%D5%BF.%D5%B0%D5%A1%D5%B5/.well-known/webfinger?resource=acct:inky@ծմակուտ.հայ: 403, \u003c!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e403 Forbidden\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eForbidden\u003c/h1\u003e\n\u003cp\u003eYou don't have permission to access this resource.\u003c/p\u003e\n\u003chr\u003e\n\u003caddress\u003eApache Server at xn--y9azesw6bu.xn--y9a3aq Port 443\u003c/address\u003e\n\u003c/body\u003e\u003c/html\u003e\n","id":"https://ծմակուտ.հայ/user/inky","level":"warning","msg":"Failed to resolve user ID","path":"/users/resolve","time":"2023-06-28T00:22:33Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:23:01 localhost run-tootik[178124]: {"id":"https://hd.206267.xyz/user/https://ծմակուտ.հայ/u/inky/","level":"info","msg":"Resolving user ID","path":"/users/resolve","time":"2023-06-28T00:23:01Z","user":"https://hd.206267.xyz/user/apirat"}
Jun 28 00:23:01 localhost run-tootik[178124]: {"error":"Cannot resolve https://hd.206267.xyz/user/https://%D5%AE%D5%B4%D5%A1%D5%AF%D5%B8%D6%82%D5%BF.%D5%B0%D5%A1%D5%B5/u/inky/: no such local user","id":"https://hd.206267.xyz/user/https://ծմակուտ.հայ/u/inky/","level":"warning","msg":"Failed to resolve user ID","path":"/users/resolve","time":"2023-06-28T00:23:01Z","user":"https://hd.206267.xyz/user/apirat"}
norayr commented 1 year ago

oh there was an issue with my apache. because socialhome did some changes and after that did not update documentation regarding apache setups, and the devs told me they don't know since they use nginx.

so i configured it somehow myself and apparently there was a problem. but first thing i thought is that the problem is connected to unicode domain. sorry.

i think i fixed it, used your webfinger url to test and fixed. and now i was able to follow myself.

thank you!

dimkr commented 1 year ago

Thank you, I'm always happy to see federation issues caused by the other server and not by a bug in tootik 😸