#dev 2024-03-04

2024-03-04 UTC
[tantek] joined the channel
#
[tantek]
I have never used (posted) URLs with userinfo "@" and am very close to cutting that out of my regex to simplify it
#
angelo
tantek can you give an example of a @-url-with-path ?
[KevinMarks] joined the channel
#
[KevinMarks]
I haven't touched that regex for a bit (I copied it into the Python version a while back) but are you close to the point where an explicit list of tlds is clearer than the compressed 2 letter combos?
#
[tantek]
angelo, @-url-with-path is for folks who want to use @ for their silo profile URL, e.g. @instagram.com/tantek
#
[tantek]
that's how you @-mention a silo profile
#
angelo
oops, i was thinking in WebFinger
#
[tantek]
users do not think about WebFinger
#
[tantek]
users do type and publish @-mentions @-@-mentions and @-url-path mentions
#
[tantek]
and @-domain and @-domain-@-domain for that matter
#
angelo
what would an example @-username-@-url-with-path be?
#
[tantek]
WebFinger-- is a very limiting model from this perspective
#
Loqi
WebFinger has -8 karma in this channel over the last year (-9 in all channels)
#
[tantek]
angelo, services that have some path segment between the domain and username
#
[tantek]
e.g. Flickr, some non-Mastodon AP implementations
#
[tantek]
or even someone that installed a Mastodon server inside a directory instead of at root
#
angelo
( (@{user|domain})?@ | https?:// ) {domain|uri} --- instead of --- (@{domain}) | https?://{domain/uri}
#
angelo
pardon the pseudoregex
#
angelo
there would be a false positive with @-domain-@-url-with-path
#
[tantek]
what's false about it? also some systems allow usernames with dots in them which then sorta resemble domains
#
aaronpk
url-with-path at the end is the wrong thing
#
[tantek]
wait, what's "wrong" about it?
#
aaronpk
well it's either @user@domain or @domain/path but there's no way @user@domain/path is possible in activitypub right?
#
[KevinMarks]
I assume we don't want basic auth URLs to work here (`http://user:password@domain/path`
#
aaronpk
basicauth--
#
Loqi
basicauth has -1 karma over the last year
#
[tantek]
the user:password portion is called "userinfo" and that's exactly what I'm talking about dropping
#
aaronpk
i wouldn't be surprised if it's dropped from the URI spec in a few years at this point
#
[tantek]
it currently *does* work in my autolinker but I've never used it, nor do I know anyone who has ever used it
#
angelo
aaronpk i believe something along the lines of @tantek@flickr.com/photos
#
[tantek]
it really ought to be discouraged, so I'm going to make that policy decision in this update
#
[KevinMarks]
that's a good call
#
angelo
tantek you're right about the dots being fine
#
[tantek]
aaronpk, ActivityPub says ZERO about @-@
#
[tantek]
basicauth-- urluserinfo--
#
Loqi
urluserinfo has -1 karma over the last year
#
Loqi
basicauth has -2 karma over the last year
#
aaronpk
now i want to see someone try to spin up an activitypub profile where @user@domain/path is the only correct way to @-mention them
#
[KevinMarks]
webfinger--
#
Loqi
webfinger has -9 karma in this channel over the last year (-10 in all channels)
#
aaronpk
i wonder if mastodon or even anything would be able to work with that
#
[tantek]
for reference: https://en.wikipedia.org/wiki/URL#Syntax (where "userinfo" is described literally)
#
[tantek]
aaronpk, install Mastodon inside a directory instead of root and find out!
#
real_devastatia
After reading all of this, I'm actually glad filter_var excludes anything that isn't a personal website URL from my address book.
#
[Joe_Crawford]
Hasn't u:p in the front of a url been deprecated for like 20 years?
#
[tantek]
because presumably that's how you'd address that instance inside a directory
#
aaronpk
speaking of which, when do we get an update to this? https://tantek.com/2011/238/b1/many-ways-slice-url-name-pieces
#
[tantek]
note that the that post completely omits userinfo
#
[tantek]
"Note: _username_ & _password_ were omitted for simplification (and you shouldn't be using http-auth anyway); _params_ omitted because it's obsolete."
#
[tantek]
I knew that even in 2011 that basicauth--
#
aaronpk
[Joe_Crawford]: no it's definitely still part of URLs, and browsers changed from visiting the page immediately to showing a prompt first, but it still workss
#
[Joe_Crawford]
!!! I didn't know that. I've not tried it in a long time. Probably with FTP.
#
[tantek]
[Joe_Crawford] userinfo is still defined in https://url.spec.whatwg.org/ and no sign of it being deprecated or obsoleted there
#
[Joe_Crawford]
```URI producers should not provide a URI that contains a username or
#
[Joe_Crawford]
password that is intended to be secret. URIs are frequently
#
[Joe_Crawford]
displayed by browsers, stored in clear text bookmarks, and logged by
#
[Joe_Crawford]
user agent history and intermediary applications (proxies). A
#
[Joe_Crawford]
password appearing within the userinfo component is deprecated and
#
[Joe_Crawford]
should be considered an error (or simply ignored) except in those
#
[Joe_Crawford]
rare cases where the 'password' parameter is intended to be public.```
#
[Joe_Crawford]
January 2005. I'm stunned to know it's extant in active specs.
#
[Joe_Crawford]
"should not" but still.
[Joe_Crawford] joined the channel
#
[tantek]
that's good enough for me
AramZS joined the channel
#
[tantek]
ok regex refactoring and update done to match what I want to match, and it got shorter 🙂
#
[tantek]
(thanks to dropping the deprecated userinfo matching bits)
#
[tantek]
now the matching code update since I simplified what gets matched to make all the combinations of @ and @-@ "work"
burley, gRegor, gRegorLove_, burley_ and jacky joined the channel
#
[tantek]
got it working. In addition to more thorough @-@ support, @-domain now also supports domains with hyphens (previous version broke), and @-@-s with domains with non-ASCII characters in them like https://loðfíll.is/@briansuda
burley, bterry, box464, [Al_Abut], jacky, [dominik], gRegorLove_, gRegor, [jeremycherfas], [Paul_Robert_Ll], [Murray], [lcs], [kimberlyhirsh], Guest6, AramZS and to2ds joined the channel
#
to2ds
🤯 When you finallly discover link header is a "thing" and not just there for decoration.
[schmarty] joined the channel
#
[tantek]
Just realized that Slack (iOS mobile app at least) auto-links @-@-mentions too! (Like the briansuda example above)
#
[tantek]
Oh interesting it looks like the Slack web *client* autolinked the @-@ that I pasted from the web last night, and then the link is what made it into the logs, not the @-@! https://chat.indieweb.org/dev/2024-03-04#t1709524276783900
#
[tantek]
Here's what it (still) looks like in Slack (on iOS mobile, a different client and device than I wrote it!)
burley joined the channel
[aaronpk] and burley joined the channel
#
[tantek]
I mean it's consistent with how Slack does other auto-linking like if I type a plain domain, slack links it and the logs see a fully qualified URL. I was just surprised that they had @-@ autolinking built in!
jacky, burley, mahboubine, sivoais and gRegor joined the channel
#
gRegor
snarfed, a couple Mastodon replies might not have sent a webmention (nothing in my received log at least). Al's reply today and Joe's a couple days ago. https://techhub.social/@alabut/112036502516191474
#
gRegor
I think the last one I got from BF was a follow on 3/2
#
gRegor
[tantek], yeah there was a confusing moment in the logs yesterday where you were talking about autolinking not working for "tantek.com" but it showed up as "http://tantek.com". I was confused until I remembered Slack adds the scheme :)
#
[tantek]
indeed and this is now my use-case for "@" for any scheme-less URL
#
[tantek]
@-scheme-less-URL = https://
#
[tantek]
btw if anyone sees any linking "weirdness" on my home page or post permalinks, please LMK ASAP!
#
[tantek]
I *think* everything is working with my autolinker update (zero regressions so far, and all new features functioning as expected), however I realize it's always easy to miss something
burley and jjuran joined the channel
#
gRegor
snarfed, webmentions for my posts today are coming in though, so maybe a temporary glitch
[snarfed] joined the channel
#
[snarfed]
thanks gRegor! will look
barnaby, gRegorLove_, burley, Renfield, bret and jacky joined the channel