Open SoniEx2 opened 5 years ago
I had trouble understanding this scenario, but I think I see now. The idea is that today you can:
web+mastodon:
links to redirect to a different URL pattern on all pages the user interacts with, using registerProtocolHandler
. The user can then override this resolution using their browser settings.web+mastodon:
links to redirect to a different URL pattern only on pages you control, by modifying the href=""
attribute to contain the rewritten URL pattern. The user cannot override this resolution.But this is asking for a third path:
web+mastodon:
links to redirect to a different URL pattern only on pages you control, by ???? (new feature here). The user can then override this resolution using their browser settings.Is that correct?
yes, I believe so. it's a fallback for when no protocol handlers have been registered.
so like, the way link resolution works is like this (roughly):
I propose adding a 5th step: if the document has a ????, use that.
Well, remember https://whatwg.org/faq#adding-new-features; let's not jump straight to specific solutions. I tried to reframe your OP in terms of use cases, instead of solutions. (Step 2.) Assuming I did so accurately, let's brainstorm other ways of accomplishing those use cases:
Both of these seem to accomplish the use case ("third path") I listed above.
By the way, per the adding new features process, the main work still to do here is step 3.
yes, we could add tracking. however I'm also a firm believer that registerProtocolHandler should only be allowed in onclick event handlers, so I'm strongly against those solutions. (and at least one of them still follows the "algorithm" of going for a document-specific handler after exhausting the other options, so I'm not too far off.)
I specifically want something implicit, with no user interaction and no malware (XSS) or tracking potential. (not using JS is also a nice bonus (I explicitly disable JS on github because their layout/design(?) is absolutely unusable) but eh w/e.)
consider these:
Hi @domenic, I had the same problem with other URI handlers. For example I want to link to a place using geo
URI. But what if there is no system handler installed for that URI? So it's safer to link directly to Google Maps thus leaving user without choice.
Another example: there is openpgp4fpr
URI scheme that points to OpenPGP key. On Android OpenKeychain handles these links but if the user doesn't have it installed they won't be able to do anything with the link. Thus I need to use https
link.
No fallbacks for URI handlers means the handlers are basically useless as it's not possible to reliably build graceful degradation using JavaScript or otherwise (source).
Or course this needs to be built with privacy in mind so that random sites wouldn't be able to infer what is installed (leading to fingerprinting?).
Or course this needs to be built with privacy in mind so that random sites wouldn't be able to infer what is installed (leading to fingerprinting?).
Thinking about that a little more, that's actually a hard task… :thinking:
that's the beauty of the meta tag approach. javascript (onclick handler) runs before navigation and you get no information about the resolved target.
well… when you have access to the resulting server/URL that is used as a fallback, you get to know that…
okay, but:
<a>
's in your page, you can just use an affiliate/tracking link. (TODO work out interactions with JS?)I mean, take your extension for example. isn't part of the point of it to divert the user away from the "input your mastodon handle here" webpage? your extension and this mechanism I'm suggesting both help websites lose tracking points on it. (altho, more importantly, it streamlines the UX, and blurs the barriers between fediverse instances.)
No, trackings links are not what I am talking about. The attacker's (trackers) idea is:
Thus they get 1 bit of tracking data out of this feature. That said, that may not be important considering what other things we have in the web platform that can be used for tracking, but hmm…
it's an (huge) improvement over getting their whole handle ;)
Indeed, that's true… (and also the case for my add-on – also the disadvantage: websites may detect you have this my add-on setup. But this is off-topic, so I've opened https://github.com/rugk/mastodon-simplified-federation/issues/35 for that)
so uh, does this have to be implemented in the browser for it to be accepted by the whatwg? or would a webextension be enough?
WHATWG specs are meant to be followed by browsers, indeed; we don't document what other software does, as that software is not constrained by specifications.
that's unfortunate, because webextensions could be such a powerful mechanism for shaping the way browsers should work. indeed, some browsers even implement various parts of whatwg using webextension-like mechanisms, just shipped with the browser.
Let's say you have a mastodon and a website, and you wanna put mastodon links that open in the user's mastodon on your website. So you go on your website and sprinkle
web+mastodon:
around only to find out that browsers are user-hostile and drop the user into a very confusing error page.It'd be nice to have a way to set all links on a website to fallback to a specific URI handler, so that it, for example, goes to your mastodon instance, or to a mastodon tutorial.
These "fallback handlers" would have to be URI-specific tho, because you may also want some ganarchy links on the same webpage, which uses
web+ganarchy
URIs instead. So you'd want, web+mastodon to be handled by a mastodon instance and web+ganarchy to be handled by a ganarchy instance.Nothing gets registered tho, so if the user goes to another webpage, they get to either use their own handlers or if none are available, that webpage's specified fallback (if any).