-
detente
is there a standard wayy to do colored text in XMPP or in a XEP?✎ -
snit
in xep-0421, it says: > Additionally, a MUC service SHOULD generate the identifier such that the occupant identifier of a user in one room of the service does not match the occupant identifier of the same user in another room of the same service. If the MUC service generates the same occupant identifier for the same user in different rooms, information shared using different nicknames and in different rooms could be combined through the occupant identifier and thereby unintentionally reveal information about the user. for one, what kinds of information leakage is the xep trying to prevent here? i'm finding it increasingly annoying that there's seemingly no way to tell whether two users in two semi-anon rooms are the same person or not secondly, assuming whatever leakage prevention is fair and valid, would it make sense to have a XEP defining an _opt-in_ identifier clients can send that hides the JID, but remains the same across MUCs? the main use-case i'm thinking about here is being able to hover over a user in a room and get your usual "mutual rooms" and "also known by" info you see in a lot of other platforms.
-
detente
is there a standard way to do colored text in XMPP or in a XEP? ✏
-
snit
> is there a standard way to do colored text in XMPP or in a XEP? i know there's a way to _generate_ a colour based on text, but i don't think you can send messages _with_ colours, if that's what you're asking ↺
-
detente
yeah it's the latter
-
wgreenhouse
it's covered by xhtml-im, so you'd need a convenient way to edit that in an xhtml-im client
-
theTedd
detente, https://xmpp.org/extensions/xep-0071.html
👍 1 -
dwd
There used to be XHTML-IM, but that was ditched because it tended to end up being a security nightmare.
-
wgreenhouse
poezio for example still supports it, at least in a receiving direction (and uses it to render IRC colors from biboumi)
-
detente
yeah that XEP is deprecated
-
detente
i think something much more minimal could be defined
-
snit
maybe if my beloved XEP-0394 (markup) gains wider support, an extension for colours could be defined :D
-
detente
i don't think we need webpages in XMPP but we could use some basic formatting, the kind of stuff even IRC can do already
-
theTedd
An extension to XEP-0394 would be my preference too
-
wgreenhouse
I think xhtml-im is fine tbh, if restricted to local content only the worst one can imagine is billion-laughs-style memory exhaustion attacks, which you shouldn't be building an xmpp client around a bad xml library anyway
👍 1 -
detente
eh, i don't think it's necessary to implement so much
-
snit
if i understand 0394 correctly, something as simple as the following should work: ``` <message> <body>THIS has colour !!</body> <markup xmlns='urn:xmpp:markup:0'> <color xmlns='urn:xmpp:color:0' begin='0' end='4' color='#FFFFFF' /> </message> ```
-
wgreenhouse
snit: hmm, 394 already specifies that, and we just need clients with convenient editors?
-
snit
it defines the markup format but not the color element
-
snit
so you'd want to either make a new XEP for colours, or add it to 0394. 0394 itself seems to explicitly encourage extension to new markup in separate specifications as well
-
snit
and then yeah all you'd need is client-side editor support
-
snit
> in xep-0421, it says: > > Additionally, a MUC service SHOULD generate the identifier such that the occupant identifier of a user in one room of the service does not match the occupant identifier of the same user in another room of the same service. If the MUC service generates the same occupant identifier for the same user in different rooms, information shared using different nicknames and in different rooms could be combined through the occupant identifier and thereby unintentionally reveal information about the user. > for one, what kinds of information leakage is the xep trying to prevent here? i'm finding it increasingly annoying that there's seemingly no way to tell whether two users in two semi-anon rooms are the same person or not > secondly, assuming whatever leakage prevention is fair and valid, would it make sense to have a XEP defining an _opt-in_ identifier clients can send that hides the JID, but remains the same across MUCs? the main use-case i'm thinking about here is being able to hover over a user in a room and get your usual "mutual rooms" and "also known by" info you see in a lot of other platforms. also not to be annoying but would i be able to get some feedback on this ↺
-
theTedd
Anonymity in semi-/anon MUCs is expected, so linking identities by default is a definite no; opt-in might be possible, but how many people would choose to do that?
-
snit
hard to say; the only answer i've ever seen about why semi-anon exists is to hide JIDs to prevent dm/invite spam and such, so it doesn't seem like most people expect joining two different rooms on the same account without being known as the same person to be a use-case. i'd certainly opt-in, and i brought this up because its come up a few times in another muc i'm in, so i reckon its something a number of people would want (i certainly would)✎ -
snit
hard to say; the only answer i've ever seen about why semi-anon exists is to hide JIDs to prevent dm/invite spam and such, so it doesn't seem like most people expect joining two different rooms on the same account without being known as the same person to be a use-case. i'd certainly opt-in, and i brought this up because its come up a few times in another muc i'm in, so i reckon its something a number of people would want ✏
-
jackhill
should xhtml-im be un-deprecated?
-
dwd
snit, I think there's a good argument that occupant-ids should be stable in rooms within the same Space.
-
jackhill
have we gotten better at sandboxed xhtml handling? Have all these email and webmail apps pushed the state-of-the-art forward?
-
detente
sandbox escapes exist
-
theTedd
dwd, `spaces-id` - just one more id, bro, then we've fixed it, bro!
-
detente
plus i don't know if everyone wants to make such a heavy client
-
dwd
jackhill, Sandboxing isn't much of a problem, but it gets nastier in messaging because you often want to, for example, cut and paste entire conversations (or at least multiple messages) and that's very hard to achieve with sandboxed individual messages.
-
dwd
theTedd, All problems in computer science can be fixed with another level of indirection?
-
theTedd
`id-id` that links all other ids together!
-
snit
> dwd, `spaces-id` - just one more id, bro, then we've fixed it, bro! we need separate ids each that are: stable in one room, stable in one space's rooms, stable in all rooms, stable globally !! ↺
-
dwd
theTedd, I feel a XEP coming on for publication just after the end of the month.
-
singpolyma
> should xhtml-im be un-deprecated? yes ↺
-
theTedd
> should xhtml-im be un-deprecated? Can devs be trusted not just to throw whatever they receive at a generic HTML renderer? This is the reason it was deprecated. ↺
-
dwd
Not just that reason, even.
-
dwd
Beyond that, both the markup and markdown XEPs were built to ensure that whether you looked at the rich or plain version of a message, you'd see the same message, which avoids various attacks (of the phishing kind of nature).
-
dwd
And then there was the UX of the safe ways of handling this in a webapp.
-
singpolyma
>> should xhtml-im be un-deprecated? > Can devs be trusted not just to throw whatever they receive at a generic HTML renderer? This is the reason it was deprecated. anyone putting unsanitized html into a web browser context is going to have other problems ↺
-
dwd
singpolyma, They did...
-
theTedd
Sure, but if the spec is large and complex enough, it basically encourages doing that over implementing it yourself
-
singpolyma
we still have people doig this today, putting the current styling content into a markdown parser (which doesn't even work...) and then the raw output into a browser. some people are just determined to break every best practise
-
theTedd
It's less intentional and more laziness
-
singpolyma
> Sure, but if the spec is large and complex enough, it basically encourages doing that over implementing it yourself well, you should definitely use off the shelf HTML stuff ↺
-
singpolyma
but need to either sanitize (using an off the shelf sanitizer) or use a real renderer and not a browser or web view
-
singpolyma
I agree the attempt in xhtml-im to define a "subset" of html was a bit silly
-
dwd
It's a profile of XHTML (obviously!) but that was the guidance from the W3C I think, back in the day.
-
jonas’
singpolyma, it help(s|ed) to be able to render in more minimal contexts though
-
detente
i don't think it's great to have the only option for colors and basic formatting be something that implies having a HTML renderer
-
singpolyma
jonas’: you mean being able to assume no one is using anything you aren't aware of? Except then in practise you'll need to check for other things anyway
-
singpolyma
detente: basically every UI framework has an HTML renderer built in anyway
-
singpolyma
that's why every protocol uses it
-
singpolyma
though it's pretty trivial to build your own, I've done it a few times
-
detente
a huge mistake in my opinion
-
singpolyma
why?
-
jonas’
singpolyma, oh, yeah, not for security purposes, clearly.
-
jonas’
but for interop purposes.
-
singpolyma
having suggestions of stuff that is likely to be common I guess would be ok
-
detente
complexity, practically requiring sandboxing these days, increased system resource use, and generally unnecessary levels of formatting
-
singpolyma
but I'd never want to rule out allowing other stuff
-
singpolyma
no sandboxing is required. there's no executable code
-
singpolyma
it's fundamentally the same as message styling just a different syntax
-
singpolyma
ironically it is "hardest" to do right in a web client
-
singpolyma
but most web frameworks are also used to this problem
-
detente
ideally if it remains just HTML only with no additions like HTML5 that essentially imply JS... but then you can use any markup language you want at that point
-
singpolyma
HTML5 is just HTML, there's no javascript :)
-
singpolyma
neither CSS nor JavaScript is necessarily involved. certainly JavaScript must not be supported that would be bonkers
-
detente
some tags essentially imply it but ok
-
snit
wait, you mean i can't send arbitrary code and expect them to run it?? smh
-
theTedd
Sandboxing wouldn't be required, except when devs blindly throw content at a browser window, and then they're executing any JS you send them. Yes they _should_ sanitise, as they _should_ do many other things, but experience shows that they do not.
-
singpolyma
indeed. and those who do not the deprecation does not help, as they also put the raw text in unescaped, or run in through a markdown parser without sanitizing, and many other problems
-
jackhill
snit: for that there's WebXDC 😜
-
theTedd
So offering people a box full of footguns maybe isn't the best way to go about it
-
singpolyma
> snit: for that there's WebXDC 😜 indeed. WebXDC is a very different beast and these objections very much do apply to it ↺
-
singpolyma
but departing from the standard format for text formatting which everything else uses just because some people hold it wrong... seems extreme to me
-
detente
you'd have to define what "HTML" is as well, as theres the Living Standard HTML of today, HTML4.01, HTML5, the earlier versions of HTML, etc...