Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webfinger error, returns 502 #302

Closed
fancypantalons opened this issue Nov 21, 2022 · 7 comments
Closed

Webfinger error, returns 502 #302

fancypantalons opened this issue Nov 21, 2022 · 7 comments

Comments

@fancypantalons
Copy link

fancypantalons commented Nov 21, 2022

It's odd because I feel like this was working just a couple of days ago, but check out this log this log and you'll find:

Webfinger error when resolving brettk@fed.brid.gy: Request for acct:brettk@fed.brid.gy returned HTTP 502

Oddly, issue #77 sounds eerily familiar to the one I'm experiencing. Is it possible there was a recent regression?

@snarfed
Copy link
Owner

snarfed commented Nov 21, 2022

Hmm, your webfinger address should be b-ark@b-ark.ca or brettk@b-ark.ca, not brettk@fed.brid.gy. Any idea why it's looking for that? Weird. I'll look.

@fancypantalons
Copy link
Author

I thought the same! I was very confused when I saw that in the log... and I have absolutely zero idea why it's doing that.

@fancypantalons
Copy link
Author

fancypantalons commented Nov 22, 2022

I think I found the commit where this broke. If we look at this commit, in common.py we see this change:

481 - 'preferredUsername': domain,
484 + 'preferredUsername': username,

This is an accidental reversion of the fix for issue #77, which is actually exactly the problem I'm having (you can see in this commit where the original change was made in activitypub.py).

My guess is this was an accidental regression?

I'll be honest, I don't actually understand the fix for #77... overriding the preferredUsername sent back to Masto seems weird. On its face it would seem to break the ability to specify custom usernames using that "acct:" URL but I am about as far from an expert on the fediverse protocol stack as there is, so my bet is there's something I just don't understand.

@snarfed
Copy link
Owner

snarfed commented Nov 22, 2022

Wow, great sleuthing! Yeah I'm sure that's the cause. I'll revert that right now.

...and you're right, I probably changed this recently thinking about custom usernames. But I expect Mastodon etc only use WebFinger for initial discovery, and then get preferredUsername and other info from the AS2 actor, eg the one we serve at /b-ark.ca, since custom usernames were still working before this regression.

@snarfed
Copy link
Owner

snarfed commented Nov 22, 2022

Argh, never mind, this is the actor code, not Webfinger. I misread. Hrmph.

@snarfed
Copy link
Owner

snarfed commented Nov 22, 2022

Confirmed, this fixes the 502 bug here. Thanks again for the sleuthing!

@fancypantalons
Copy link
Author

Glad I was able to help, and thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants