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

Odd webmention source URL for a like? #600

Closed
gRegorLove opened this issue Jul 26, 2023 · 5 comments
Closed

Odd webmention source URL for a like? #600

gRegorLove opened this issue Jul 26, 2023 · 5 comments

Comments

@gRegorLove
Copy link

There might be some oddities with the /convert URLs in webmentions. Tonight I received webmention:

source=https://fed.brid.gy/convert/activitypub/web/https:/xoxo.zone/users/artlung%23likes/591665
target=https://gregorlove.com/2023/07/weekend-roundup/

When I fetch the source I get a 301 to https://ap.brid.gy/convert/web/https:/xoxo.zone/users/artlung#likes/591665?

Is that meant to be ^^ instead of #?

The HTML source of that appears to be an h-card with no id=likes, and a meta-refresh to the profile:

HTML:

<!DOCTYPE html>
<html>
<head><meta charset="utf-8">
<meta http-equiv="refresh" content="0;url=https://xoxo.zone/@artlung"></head>
<body class="">

  <span class="h-card">
    <data class="p-uid" value="https://xoxo.zone/users/artlung"></data>
    <a class="p-name u-url" href="https://xoxo.zone/@artlung">Joe Crawford</a>
    <span class="p-nickname">artlung</span>
    <img class="u-photo" src="https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/accounts/avatars/107/406/944/287/698/280/original/3ed98f44a50a3716.jpeg" alt="" />
<img class="u-photo" src="https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/accounts/headers/107/406/944/287/698/280/original/00533750f17a4e6b.png" alt="" />
  </span>

</body>
</html>

mf2:

"type": [
    "h-card"
],
"properties": {
    "uid": [
        "https://xoxo.zone/users/artlung"
    ],
    "name": [
        "Joe Crawford"
    ],
    "nickname": [
        "artlung"
    ],
    "url": [
        "https://xoxo.zone/@artlung"
    ],
    "photo": [
        {
            "value": "https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/accounts/avatars/107/406/944/287/698/280/original/3ed98f44a50a3716.jpeg",
            "alt": ""
        },
        {
            "value": "https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/accounts/headers/107/406/944/287/698/280/original/00533750f17a4e6b.png",
            "alt": ""
        }
    ]
}
@snarfed
Copy link
Owner

snarfed commented Jul 26, 2023

Ugh, I can't catch a break on these wm source URLs. Thanks for the heads up. I switched from ^^ back to %23 the other day, #581 (comment) , because ^^ never actually solved the problem it was aiming at, pfefferle/wordpress-webmention#359 , and it was confusing people. I'll fix this.

snarfed added a commit that referenced this issue Jul 26, 2023
it should have already been using them!

for #600
snarfed added a commit that referenced this issue Jul 26, 2023
not entirely sure about this one, will see

for #600
@gRegorLove
Copy link
Author

@snarfed Is there something wrong on my end parsing the source URL? I wasn't sure because I saw the encoded %2523 in the original, but when I fetch it, it seems to be ending up with the un-encoded #

@snarfed
Copy link
Owner

snarfed commented Jul 26, 2023

No, the redirected Location with the raw # was just a BF bug, and ideally it should have used the second, non-redirected URL as the source anyway.

@snarfed
Copy link
Owner

snarfed commented Jul 26, 2023

Should be fixed now, feel free to retry!

@gRegorLove
Copy link
Author

Thanks! https://fed.brid.gy/convert/activitypub/web/https:/xoxo.zone/users/artlung%23likes/591665 looks right when I fetch in the browser now.

I think my webmention URL handling does have an issue. It appears to be un-encoding before fetching, so it still ends up with the Mastodon profile, but that's on my end.

@snarfed snarfed closed this as completed Jul 26, 2023
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