XSF Discussion - 2019-10-08


  1. jonas’

    I nominate dwd to be our new department of troll marketing.

  2. jonas’

    I nominate dwd to be our new department of sarcastic(?) marketing.

  3. Daniel

    at least he doesn’t repost the same joke 5 times in a span of a week. scnr :-)

  4. Ge0rG

    Daniel: that was mean(ingful)!

  5. moparisthebest

    Does anyone have a link documenting the numerous vulns clients had relating to xhtml-im ?

  6. moparisthebest

    I was hoping for a mailing list post or wiki page...

  7. dwd

    There was Waqas's presentation about a decade back. (Maybe more recent than that, I forget).

  8. Zash

    Also, can someone explain to me how Matrix and Mastodon and pretty much everything else gets away with sending actual HTML in JSON but we can't send a sane subset of HTML in XML?

  9. dwd

    Single implementation probably helps.

  10. pep.

    Because it's better to mix input and wire format, and users do it anyway

  11. Seve

    Implementation details should not block standards

  12. Zash

    Bring back XHTML-IM!

  13. pep.

    Bring back XHTML-IM!

  14. Zash

    Ropen skalla, XHTML-IM åt alla!

  15. flow

    Bring back XHTML-IM!

  16. Ge0rG

    Bring back GC1.0!

  17. Zash

    U wut m8?

  18. jonas’

    Bring back XHTML-IM!

  19. pep. kicks Ge0rG

  20. jonas’

    how about we put this on the next all-member meeting agenda?

  21. jonas’

    yes, all-member meetings are a thing ;)

  22. pep.

    jonas’, or just council

  23. jonas’

    pep., I can predict the answer

  24. pep.

    wait for next council?

  25. jonas’

    it has to do with XEP-0001 not having a transition from state_of(xep_number("XHTML-IM")) -> {Experimental,Draft,Final}

  26. pep.

    Yeah I was wondering about that

  27. jonas’

    so it’d defer to Board

  28. jonas’

    since Board owns XEP-0001

  29. pep.

    That's a more generic question then

  30. pep.

    Not just 0071

  31. Ge0rG

    then Board may or may not define such a state transition and defer back to Council

  32. jonas’

    pep., although somebody floated the idea of re-defining XHTML-IM from scratch anyways

  33. jonas’

    which I support, actually

  34. pep.

    I could get along with that I guess

  35. jonas’

    with more clearly-defined use-case profiles

  36. jonas’

    and without @style

  37. Ge0rG

    Yes.

  38. dwd

    If someone can show that HTML within messages has a solution, I'm all for it. But last time we were here, it seemed that every implementation had suffered serious security problems.

  39. pep.

    Should we call it xhtml-im2

  40. pep.

    This time it's for real

  41. dwd

    FWIW, if there were some solution that meant we should shift around PWAs in messages that'd be awesome.

  42. Ge0rG

    dwd: modern web applications can be made secure with a global switch instead of having to sanitize every individual string, AFAICT

  43. jonas’

    dwd, I’ve been back and forth on this, and I think some standards simply require a basic level of intelligence, and if you cannot read Security Considerations, you maybe should not implement standards. or anything.

  44. Zash

    dwd, my observation is that any alternative will be equally terrible.

  45. jonas’

    dwd, PWA?

  46. dwd

    jonas’, A single-page web app.

  47. dwd

    jonas’, I mean, if we could safely ship aorund CSS and Javascript, that'd be amazingly amaing.

  48. Zash

    Not Progressive Web App?

  49. jonas’

    dwd, would it be?

  50. jonas’

    dwd, I think that sounds terrible ;)

  51. Ge0rG

    I thought those are SPAs

  52. jonas’

    but I hate the current web, so...

  53. dwd

    jonas’, Sure. Apps in messages, what's not to like?

  54. jonas’

    dwd, everything?

  55. Zash

    dwd, I hate everything about that

  56. MattJ

    waqas created a sanitizer for xhtml-im, it works... what else is there to debate?

  57. jonas’

    MattJ, does it sanitize @style?

  58. Zash

    `tag.attr.style = nil`

  59. Ge0rG

    MattJ: is it written in JavaScript that can be bundled within an XHTML-IM message?

  60. Zash

    A Message Web App that sanitizes itself?

  61. dwd

    Zash, It'd sanitize the messages it sent to other people. I detect a flaw here.

  62. MattJ

    jonas’, it does

  63. Ge0rG

    dwd: you encountered sarcasm.

  64. MattJ

    Can't we just define a flag that clients need to send if their xhtml-im payload is malicious?

  65. MattJ

    Lighter than including a full sanitizer with every message

  66. pep.

    that ^

  67. MattJ

    Oh wait, XEP-0076

  68. pep.

    woo, we already have all the tools

  69. Ge0rG

    MattJ: but it's using an insecure xmlns :(

  70. dwd

    MattJ, Needs to be updated in line with XEP-0419.

  71. Seve

    Nice, solutions right away

  72. pep.

    Ge0rG, btw, you should push for 419 to go draft, there's already an implementation!!

  73. Ge0rG

    pep.: which one?

  74. pep.

    poezio's rot13 and b64 plugins

  75. Ge0rG

    pep.: but 419 is for XEPs, not for .py's

  76. pep.

    :(

  77. dwd

    pep., Is it doing whole stanza encryption (example 1)?

  78. pep.

    dwd, no but it should indeed

  79. Ge0rG

    dwd: I still think full-stanza-encryption would've been much funnier with rot13.

  80. dwd

    pep., Sorry, not Example 1, Example 2. I ask because most implementations seem to be mistakenly doing Example 3.

  81. pep.

    right

  82. dwd

    Ge0rG, Really? I rather enjoyed the deadpan comparison between the examples.

  83. Ge0rG

    dwd: must be an instance of British Humour, then

  84. dwd

    I note that XEP-0419 is the latest e2e encryption method in XMPP, too.

  85. Ge0rG

    latest and greatest.

  86. Ge0rG

    I wonder if people will appreciate if I announce that yaxim has had it from day 0.

  87. Ge0rG

    now that I think of it, yaxim implements it for ten years already.

  88. Ge0rG

    I just didn't have the feature namespace.

  89. moparisthebest

    Seve: so can we just have a xep that says "execute this binary code as x86 instructions, but just the safe parts" ? If implementation details shouldn't block standards that is >:)

  90. larma

    moparisthebest, I think the cool guys use webassembly for this nowadays

  91. Seve

    moparisthebest, I just thing we should go as fast as the smartest in class, not the dumbest.

  92. Seve

    moparisthebest, I just think we should go as fast as the smartest in class, not the dumbest.

  93. moparisthebest

    Sure, we can all use one client and server and not even bother writing standards

  94. moparisthebest

    That is easiest and fastest

  95. jonas’

    moparisthebest, that’s not the same thing

  96. jonas’

    and you’re being needlessly hyperbolic

  97. Ge0rG

    is it possible to add a line break inside a <td> in XEPs?

  98. Ge0rG

    jonas’: I've got https://github.com/xsf/xeps/pull/841 but I'm most probably not ready yet and I would like to have one history/revision block for all that's different from CS-2019

  99. Zash

    Ge0rG: That description seems a bit redundant, don't you think?

  100. Ge0rG

    Zash: I didn't want to leave it empty

  101. moparisthebest

    Seve, jonas’ , yea sorry, mainly just pointing out that while I agree in principle that xeps shouldn't depend on implementations, if in practice 100% of implementations have security problems, that's probably a root issue that needs to be solved/defined/something by the xep

  102. moparisthebest

    other people have worded that way better in the past so just ignore me :)

  103. Ge0rG

    better specs help.

  104. moparisthebest

    I think it's possible to have a "secure" spec that, in practice, is impossible to implement securely, which I'd then argue is a bad spec

  105. Ge0rG

    moparisthebest: which XHTML-IM is a prime example of

  106. Zash

    Is it impossible?

  107. jonas’

    I think waqas proved the opposite.

  108. Zash

    Isn't it just that it's too convenient to do the wrong thing

  109. jonas’

    and once you drop @style, I’d say it’s very trivially possible to implement securely

  110. jonas’

    what Zash says

  111. Zash

    Which 393 for example doesn't help with

  112. moparisthebest

    are you going to write your own HTML/CSS engine, or fork chrome/firefox's and try to disable javascript but still keep up on other security issues, or ?

  113. Zash

    "Oh this looks like Markdown, I'll just take this markdown library and forgot to disable HTML pass trough"

  114. moparisthebest

    yes, in theory those things are possible, in practice, no one is going to do them

  115. Zash

    No one is going to do what?

  116. jonas’

    moparisthebest, bugs in the rendering engine are not in scope for XMPP software, unless XMPP software writes their own engine.

  117. jonas’

    why would you fork a rendering engine for this?

  118. jonas’

    why would you write your own?

  119. jonas’

    both don’t make sense

  120. Ge0rG

    Just bundle an old version of Electron with your chat app

  121. jonas’

    both Qt and Gtk support a subset of HTML in any widget (which surprisingly is a superset of what XHTML-IM), so they’re covered. If you’re using a web browser (natievly or via widget) to render/execute your app, you have a rendering engine right there.

  122. jonas’

    you just need to do the fing sanitisation, which is fing trivial if we omit @style for a second

  123. Zash

    jonas’, and @on*

  124. jonas’

    just have a whitelist of elements, and everything which isn’t that is replaced by its children.

  125. jonas’

    Zash, those are forbidden anyways

  126. jonas’

    in XHTML-IM

  127. Zash

    whitelist elements and attributes (@style excluded)

  128. jonas’

    s/elements/elements and attributes/

  129. jonas’

    yes

  130. jonas’

    it’s not hard in any way

  131. jonas’

    it’s written in the security considerations (more clearly than it was back then, admittedly)

  132. jonas’

    if you can’t read security considerations, maybe you shouldn’t be implement standards

  133. jonas’

    if you can’t comprehend the security considerations of a specific standard, get help and get the standard clarified

  134. jonas’

    Ge0rG, any reason you make that a PR?

  135. jonas’

    Ge0rG, mark it WIP in the title at least

  136. Zash

    jonas’, you don't happen to have a nice short rationale for why @style needs to gtfo?

  137. jonas’

    Zash, requires an extra parser

  138. jonas’

    aside from that, allows stuff which probably only works on your machine

  139. jonas’

    (colors and things)

  140. moparisthebest

    jonas’, that's the theory, in practice, a developer reads a much simpler spec like 393, writes a few regexes, gives up and just passes it to a markdown processor

  141. moparisthebest

    (this just happend earlier today, hence my question)

  142. jonas’

    moparisthebest, oh, so exactly the thing happened everyone said it would?

  143. Zash

    It also almost happened in Converse.js

  144. moparisthebest

    yes and also we brought up all this as soon as he suggested the markdown processor, so it hasn't *actually* happened yet, but it would have

  145. jonas’

    moparisthebest, can’t blame them, XEP-0393 doesn’t mention that as a problem

  146. moparisthebest

    I was trying to find links about why this was a terrible idea

  147. larma

    so how about we all just implement 394?

  148. Ge0rG

    jonas’: I made it a PR because I wanted to discuss the content changes in Council tomorrow

  149. jonas’

    Ge0rG, you can do that in your own fork instead

  150. jonas’

    larma, I’d like to burn XEP-0394

  151. Ge0rG

    jonas’: good point

  152. larma

    jonas’, why? IMO it's superior to 393, it just has the flaw that it doesn't work well with legacy fallbacks (because you can't hide any chars that are only for fallback)

  153. jonas’

    larma, but it’s not superior to XEP-0071

  154. jonas’

    (or a slightly saner redefinition of XEP-0071)

  155. larma

    Well, it only has a subset of the features, but also is less likely to be accidentally use a HTML rendering engine

  156. jonas’

    I’m pretty sure it’s also harder to implement, and will be fun especially in memory-unsafe languages with all that string slicing involved.

  157. larma

    If I'd want to do it right, as a client developer I would probably convert all 3 versions into some data structure that is approximately 394

  158. larma

    Then I can convert that into any format required for my rendering engine

  159. jonas’

    except that you’d normally mix the text with that data structure

  160. jonas’

    not like '394 does

  161. moparisthebest

    so if I'm understanding this correctly, there is a scale of difficulty-to-implement vs security-of-implementation, ranging from so hard to implement no one will bother, making it secure, all the way to so easy to implement wrongly everyone implements it but it's totally insecure

  162. moparisthebest

    something like that

  163. larma

    jonas’, do you? HTML does, but other might not. It's actually a bad idea because it creates the requirement of escaping the actual text to ensure it's not considered markup

  164. jonas’

    larma, only if your data structure is a string

  165. moparisthebest

    394 makes you write your own parser and rendering engine, no one does it, xhtml-im is easiest to implement by just slapping it into a DOM, everyone does it, is insecure

  166. jonas’

    which I’d consider a terrible idea to start with :)

  167. jonas’

    moparisthebest, nobody forces you to write a rendering engine for '394

  168. jonas’

    moparisthebest, you can convert '394 to Qt text styles, to Gtk whatevers, and to HTML

  169. jonas’

    that’s not the sisue

  170. jonas’

    that’s not the issue

  171. moparisthebest

    but you have to write your own parser, and perhaps harder, "reverse parser"

  172. jonas’

    it’s just a painful thing to do

  173. jonas’

    yeah

  174. moparisthebest

    how do you get from input format to 394

  175. jonas’

    moparisthebest, if you’re using Qt or Gtk, you can probably more or less directly convert the respective datastructures to '394

  176. jonas’

    (the QTextDocument stuff for example)

  177. jonas’

    from HTML, it’s a bit trickier, but also possible.

  178. larma

    - 71 is not directly compatible with many non-complex renderers. Input needs to be sanitized before being used in complex renderers. - 393 is not directly compatible with any markdown parser known to me, even though some might choose to use a incompatible markdown parser to implement it. If a markdown parser is used to generate HTML, same issue as with 71 might come up. - 394 can be sanitized rather easily (check there is no overlap) and then can be used securely and without tons of efforts in most environment including HTML renderers

  179. larma

    I think implementing 394 securely in a browser might actually be easier than implementing 71 securely in a browser, where browsers should be *the* example of allowing easy implementation of 71...

  180. jonas’

    larma, '71 is directly compatible with GTK and Qt, without the need for sanitisation (if you ignore @style).

  181. jonas’

    or do you consider those "complex"?

  182. jonas’

    otherwise, which other non-complex renderers are there?

  183. larma

    jonas’, it's not. Pango makup used by GTK only supports very few tags and actually uses CSS-like style for most stuff

  184. larma

    https://developer.gnome.org/pygtk/stable/pango-markup-language.html

  185. larma

    Not sure about Qt

  186. jonas’

    ugh, it’s still at <i/>

  187. larma

    It also doesn't do blockquote or body or img or any of the enumerations (it doesn't support such at all, as it's a text markup only thing). The "correct" way to use it is <span>s

  188. jonas’

    pity

  189. jonas’

    not great for accessibility either

  190. larma

    how is it related to accessibility?

  191. jonas’

    larma, <em/> for example to mark up emphasis

  192. jonas’

    enumerations and stuff, blockquotes

  193. jonas’

    all that’s relevant to screenreaders

  194. larma

    I don't think GTK wants you to provide screenreader annotations through display/styling markup

  195. jonas’

    how else does it work with Gtk then?

  196. jonas’

    seems odd to me to have that redundant

  197. larma

    Well Pango is a text rendering engine, it does only that single job of using font data and input text to generate an image. You also use it when drawing text on images, so it makes little sense to have accessibility markup at that point

  198. jonas’

    yeah, I was talking about Gtk for a reason and am looking at GtkTextBuffer instead

  199. jonas’

    (and GtkTextView)

  200. jonas’

    using plain pango to render text is bound to be a PITA

  201. jonas’

    BTGNT

  202. larma

    Dino uses GtkLabel which only supports pango markup for all message rendering 😉

  203. jonas’

    that won’t be enough for stuff like blockquote anyways

  204. jonas’

    I’m also not sure how you’d mark up a GtkLabel itself for screenreaders to understand what’s going on

  205. larma

    I think you do all this stuff with ATK, but haven't tried yet

  206. larma

    Also doing screen readers right for IM is probably not easy and won't work out of the box no matter which toolkit...

  207. jonas’

    very true

  208. moparisthebest

    nice to see there are 0 open source XMPP mac apps but a ton of matrix/telegram/other ones :'( https://github.com/serhii-londar/open-source-mac-os-apps#chat

  209. pep.

    Most of these are electron apps no?

  210. pep.

    Does padé not work there?

  211. moparisthebest

    no idea, was just pointing out that someone seeing this list doesn't even see xmpp listed at all

  212. moparisthebest

    I know Monal for instance should be there, probably gajim ? what about dino? surely there are a TON of open source XMPP apps that run on MacOS

  213. pep.

    Go PR! :)

  214. pep.

    Is there a list of list page on the wiki or sth?

  215. pep.

    That needs to be updated every so often

  216. moparisthebest

    probably most of the command line clients work on mac too right?

  217. moparisthebest

    I'll friggin put in a PR adding 50 XMPP clients that run on mac if I can find them :D

  218. Zash

    https://github.com/xsf/xmpp.org/blob/master/data/clients.json

  219. Zash

    "Awesome" here means "List of stuff" these days?

  220. Ge0rG

    Monal is probably the only one that qualifies as a Mac app

  221. moparisthebest

    yea it's a thing now, no idea where it started

  222. Zash

    Adium?

  223. Zash

    It's been a thing for quite a while

  224. pep.

    It's not maintained anymore is it

  225. Ge0rG

    pep.: ten years ago, like everything in xmpp

  226. pep.

    right

  227. moparisthebest

    maybe it's just because we aren't on these awesome lists

  228. Zash

    Yet another hierarchical oooooooooosomething

  229. Zash

    moparisthebest, basically ^C^V https://xmpp.org/software/clients.html ?

  230. Zash

    | grep macos

  231. DebXWoody

    I think I was able to install psi or psi+

  232. moparisthebest

    curl https://raw.githubusercontent.com/xsf/xmpp.org/master/data/clients.json | jq '.[] | select(.platforms | index("macOS")) | "[" + .name + "]" + "(" + .url + ")"' | sort -u | tr -d '"'

  233. moparisthebest

    got to learn some jq today, I'll put in the PR later... gotta figure out what language they are each written in manually, guess that's important for mac users somehow?

  234. Zash

    Myeah, I'm not sure what's up with that.

  235. Zash

    Maybe it's aimed at developers?

  236. moparisthebest

    good news is we have 24 different macOS clients though

  237. lskdjf

    moparisthebest, I hope you don't want to try and add all of those clients to that "awsome" repo, though. Abandoned clients probably don't shed a good light on XMPP. Maybe pick the most reasonable 2/3 instead.

  238. Ge0rG

    Maybe pick the only one that's a Mac app.

  239. Zash

    How's the Tigase one, Beagle?

  240. moparisthebest

    lskdjf: why not? It has telegram clients marked abandoned too

  241. lskdjf

    moparisthebest, I already gave my reasoning: because bothering people with bad clients sheds a bad light on xmpp. Something is not good just because telegram people do it.

  242. moparisthebest

    I don't have a Mac and no way to pick the best couple

  243. lskdjf

    then maybe you are either not the best person to do the PR or need more information first 🤷️

  244. moparisthebest

    Well no one else seems interested in doing it

  245. moparisthebest

    Besides that list is like "all open source Mac software" not just good ones

  246. Zash

    moparisthebest: Make an "Awesome XMPP clients" list and get it into the Awesome hierarchical directory that's totally not like early Yahoo! at all.

  247. Zash

    There was some XMPP stuff under "ChatOps" but I didn't look further

  248. moparisthebest

    I was thinking about making an awesome awesome list of all the awesome lists

  249. Zash

    That exists already

  250. lskdjf

    too late, that already exists https://github.com/sindresorhus/awesome

  251. moparisthebest

    Damnit, just like all my good ideas

  252. pep.

    We're not listed in Decentralized!!1 Mastodon is!

  253. lskdjf

    pep., no the awsome list about mastodon is :p we first need an "awsome xmpp" list 🙂

  254. Zash

    pep.: There are only 2 XMPP services¹ ¹ according to https://the-federation.info/

  255. Zash

    pep.: There are only 3 XMPP services¹ ¹ according to https://the-federation.info/

  256. pep.

    Yeah.. I know that one..

  257. Zash

    Wanna help with my WIP mod_nodeinfo2.lua?

  258. pep.

    I want to help with lots of things. Now how do I prioritize all that

  259. Zash

    "Awesome TODO"

  260. pep.

    :D

  261. Link Mauve

    “15:38:27 flow> Link Mauve, +1, is the list public somewhere? Maybe even in the wiki?”, only on a WIP branch from years ago, which will need a namespace bump: https://github.com/linkmauve/xeps/tree/xep-0234