Hi,
I have a new install which I've set up with webfinger_domain = "example.com" and domain = "microblog.example.com".
My account is shown as me@example.com, but webfinger requests don't seem to work correctly.
The redirect seems to be ok -- I get a valid response from https://example.com/.well-known/webfinger?resource=acct%3Ame%40microblog.example.com
But a call to https://example.com/.well-known/webfinger?resource=acct%3Ame%40example.com gives a 404. I assume this is what other servers will do to look up the username?
It looks like this line means a 404 will be returned for any resource that doesn't match me@microblog.example.com, instead of checking the webfinger_domain ? https://git.sr.ht/~tsileo/microblog.pub/tree/v2/item/app/main.py#L1259
I'm not too familiar with ActivityPub or Python, so apologies if I've interpreted this wrongly.
Thanks for an excellent project!
Aonrud
Hey!
Good catch! This is a bug you're correct, I just pushed a fix. Let me know if it works correctly on your end once update.
Thank you! And happy new year!
Thanks -- happy new year to you too!
I don't see a new commit, but I've been experimenting with editing the line above to use the webfinger_domain. That makes the correct webfinger URL work (i.e. example.com/.well-known/webfinger?resource=acct%3Ame%40example.com ), but my tests with Mastodon are now giving errors.
As I understand it, the remote follow link will just redirect to, e.g., mastodon.social/authorize_interaction?uri=https://microblog.example.com, at which point Mastodon will perform its lookups. However, I'm now getting the message "Unfortunately, there was an error looking up the remote account" on Mastodon's side.
I can see a 404 request to microblog.example.com/.well-known/webfinger?resource=acct%3Ame%40microblog.example.com in the uvicorn.log with a Mastodon user agent, but I don't know where it's getting that account name from. I assume it's looking it up against the given URI somewhere and getting the wrong account name, but I can't see any obvious place where this is being set in the code.
Any thoughts? I'm not sure if it's a setup issue on my end, or if that account name is being incorrectly set somewhere in Microblog.pub.
Thanks again,
Aonrud
I just pushed another tweak that allows both domain, can you give it a try and let me know?
I will take sometime later to try to replicate if it does not work.
Thanks!
That was quick! That seems to solve it, thanks. I'm not entirely sure why Mastodon is requesting that account url, but everything is displaying properly with the webfinger_domain, so it works correctly anyway.
Many thanks for your help.
Aonrud
It's a bit weird, but I think it makes sense to answer to both, as when you just know the "ActivityPub ID" (basically the domain for microblogpub), you have no way to know about the webfinger domain, beside doing a webfinger for the "AP domain" and see if you can discover the "webfinger domain". As webfinger is not mandatory/part of the ActivityPub spec.
Thanks!