jdev - 2023-10-27


  1. Guus

    I'm trying to do a bit of implicit testing of our new network stack by having some s2s traffic. I'd appreciate people trying to set up a quick connection to see if something unexpected happens. You can use this temporary account: interop@igniterealtime.org (send it a message or something). Let me know if you're running into something unexpected!

  2. MattJ

    Guus, tested all the badxmpp domains? :)

  3. Guus

    Someone else is, yes :)

  4. Guus

    we're developing something that interacts with that from our CI setup

  5. Guus

    I'm primarily trying to get some data outside of the stuff that we thought of ourselves. Letting random people do random things is a good way to fill up the logs. :)

  6. Link Mauve

    Guus, fyi, xmpp2.igniterealtime.org. doesn’t reply on port 5269.

  7. Guus

    xmpp2 should be offline

  8. Guus

    is it still in our DNS?

  9. Link Mauve

    It is.

  10. Guus

    eek, let me fix that

  11. Link Mauve

    Also, xmpp.igniterealtime.org. doesn’t reply anything on bad input, I think it should close the socket or something perhaps.

  12. Zash

    Guus: fyi it would be easier to click an uri like xmpp:interop@igniterealtime.org :)

  13. Zash

    Guus: fyi it would be easier to click an uri like xmpp:interop@igniterealtime.org?message :)

  14. Guus

    xmpp2 has now been removed from our SRV records (most records had a 300s TTL).

  15. Zash

    No delivery error... yet?

  16. Guus

    Link Mauve: the bad input test isn't something that we gave much thought in this rewrite. It's something to look into.

  17. Guus

    Zash, thanks (and thanks - I responded)

  18. Zash

    Guus: go talk to some badxmpp.eu hosts? :)

  19. Guus

    Zash: yeah, we do

  20. Zash

    :)

  21. Guus

    oh, who's doing the localhost thing?

  22. Martin

    The localhost thing?

  23. Guus

    someone is trying to identify themselves as 'localhost'

  24. Martin

    Works. :)

  25. Martin

    Wrong window…

  26. Guus

    DirectTLS was enabled just now, which is likely what Martin was testing :)

  27. Guus

    ... looking forward for someone doing a test that's not using Prosody ;)

  28. Link Mauve

    I used netcat!

  29. Guus

    hehe - ok ok

  30. Kev

    You already tested against an M-Link Edge when you sent me messages yesterday, right?

  31. Guus

    if you were on M-Link Edge at the time, yes - but that was accidental :D

  32. Guus

    I think that Openfire is using the default c2s max idle time for s2s too - I'm seeing reconnects every 5/6 minutes from some domains (I think we had it at something like 30 minutes before). All of those defaults are pretty much based on nothing but a gut feeling. Does anyone have a rationale for reasonable timeouts?

  33. Kev

    I'm not an Edge, I'm on an M-Link User Server, but there's an M-Link Edge between the user server and the Internet :)

  34. Kev

    I'm not on an Edge, I'm on an M-Link User Server, but there's an M-Link Edge between the user server and the Internet :)

  35. jonas’

    Guus, prosody doesn't timeout s2s on its own at all

  36. Guus

    Which one is the 30 minutes timeout then? Ejabberd?

  37. jonas’

    yeso

  38. jonas’

    yes

  39. lovetox

    i thought about how to go about implementing https://xmpp.org/extensions/xep-0394.html

  40. lovetox

    and i have no clue to be honest

  41. lovetox

    i mean specifically the receiving side

  42. lovetox

    has someone implemented that?

  43. MSavoritias (fae,ve)

    xmpp.org at least comes up empty

  44. jonas’

    lovetox, no, and there's a reason I abandoned it

  45. jonas’

    just re-implement XHTML-IM

  46. Zash

    but securely

  47. Zash

    somehow all the other things manage to use HTML for on-wire formatting, surely we can too

  48. lovetox

    thats great for clients that display html, for all others it does not really matter

  49. jonas’

    lovetox, even poezio supports XHTML-IM

  50. jonas’

    I'm not sure what you're trying to say.

  51. Zash

    lovetox, it's in fact worse for clients that display html already, because they need to be extra careful not create security problems

  52. lovetox

    that it does not matter if you use standard html tags, or invented tags (like in 0394), when the client cant display html

  53. Link Mauve

    You can take our code if you want, it’s already in Python.

  54. jonas’

    no, '394 is a huge mess

  55. jonas’

    it's much trickier to implement because you can easily miscount and stuff

  56. MSavoritias (fae,ve)

    it doesnt even have security considerations

  57. lovetox

    with displaying html i mean, passing the html as is to a engine which draws it to the screen, with no added effort by the developer

  58. jonas’

    > passing the html as is to a engine nope, don't

  59. Link Mauve

    jonas’, sadly new XEPs like replies also rely on counting codepoints…

  60. Link Mauve

    (If you want the fallback.)

  61. wgreenhouse

    MSavoritias (fae,ve): that must mean it's secure! 😎

  62. Link Mauve

    lovetox, please never do that, ever.

  63. Link Mauve

    You don’t want to enable JavaScript vulnerabilities just because.

  64. Zash

    > with displaying html i mean, passing the html as is to a engine which draws it to the screen, with no added effort by the developer Absolutely under no circumstances should you do this!

  65. Link Mauve

    And no browser engine lets you just disable JavaScript in their API.

  66. lovetox

    what i mean is, if you cannot use standard libraries to get value from html, you need to write a parser and translation to your UI framework from scratch

  67. Trung

    Link Mauve: Oh i like your avatar !

  68. lovetox

    and it does not really matter if you build upon html, or some new invented language

  69. Link Mauve

    Trung, thanks. :)

  70. wgreenhouse

    Link Mauve: poezio's xhtml-im is too good! (poezio + biboumi perfectly reproducethe illegible stylings of irc spammers)

  71. jonas’

    lovetox, it does, if you consider ecosystem support.

  72. Link Mauve

    Trung, I’ve had it for years, but some clients (all clients on Android for instance) don’t support SVG.

  73. jonas’

    XHTML-IM still has support in clients, I do not know of a single client implementing '394

  74. MSavoritias (fae,ve)

    > and it does not really matter if you build upon html, or some new invented language it matters in the sense that we already know how to handle html. and we are not specifying it alone

  75. Link Mauve

    wgreenhouse, yay!

  76. wgreenhouse

    Link Mauve: poezio's xhtml-im is too good! (poezio + biboumi perfectly reproduce the illegible stylings of irc spammers)

  77. lovetox

    jonas’, not sure what you are getting at, xhtml-im is dead, nobody did any effort to change that in years

  78. MSavoritias (fae,ve)

    we need to use more standard stuff not less in xmpp

  79. Link Mauve

    lovetox, it isn’t though.

  80. MSavoritias (fae,ve)

    we already have that problem with omemo anyway

  81. jonas’

    lovetox, the same words apply to '394.

  82. jonas’

    with the exception that there are a lot of folks thinking now that abandoning xHTML-IM was a bad idea, while there is approximately one person who thinks that '394 might be a good idea.

  83. Link Mauve

    Who?!

  84. lovetox

    maybe i misunderstood, did you make any proposal?

  85. jonas’

    Link Mauve, the person who took over '394 might

  86. jonas’

    (I'm not listed as author anymore)

  87. Link Mauve

    Ah maybe.

  88. jonas’

    lovetox, my proposal is: implement XHTML-IM. once it re-gains traction in the ecosystem, respecify it properly.

  89. jonas’

    '394 is a dead end.

  90. Link Mauve

    ↑ agreed.

  91. lovetox

    it probably will not gain traction anytime soon

  92. jonas’

    why not?

  93. singpolyma

    >> with displaying html i mean, passing the html as is to a engine which draws it to the screen, with no added effort by the developer > Absolutely under no circumstances should you do this! Depends what kind of engine. Android has a built in html parser specifically for basic text styling case thrt doesn't support dangerous stuff, for example, which i use

  94. MSavoritias (fae,ve)

    agreed. i would love to work personally on an xhtml but specified on top of html5

  95. lovetox

    because xhtml does not work with omemo

  96. jonas’

    lovetox, '394 doesn't, either.

  97. lovetox

    of course it does

  98. Zash

    singpolyma, until one day someone adds some dangerous stuff

  99. jonas’

    unless you use the actual real new OMEMO which does full stanza encryption.

  100. MSavoritias (fae,ve)

    either way stuff moves to mls /shrug

  101. Zash

    or someone ports the code to a different environment

  102. lovetox

    394 does not add stuff from the message, its just metadata

  103. singpolyma

    > singpolyma, until one day someone adds some dangerous stuff That would affect every android app though not just us

  104. lovetox

    while xhtml adds the full plaintext

  105. lovetox

    not saying xhtml-im is bad or anything, i dont care

  106. MSavoritias (fae,ve)

    xhtml can be fixed

  107. lovetox

    i just say, the traction is bound to omemo:2

  108. lovetox

    which also is a huge task

  109. singpolyma

    Yes, twomemo or ox or mls. Something sane

  110. MSavoritias (fae,ve)

    you cant improve 394 enough to make it good without making it a complete mess

  111. lovetox

    so thats why im saying, it will not happen anytime soon

  112. Link Mauve

    lovetox, in the meantime, you can already support the common case where OMEMO isn’t used.

  113. lovetox

    need to write a html parser, and a mapping to my ui framework thats supports unlimited nesting of all kind of elements

  114. lovetox

    not sure i want to get into this really

  115. opal

    > (If you want the fallback.) i'm correct to assume that 0071's fallback is simply to ignore unknown or unsupported (due to security-imposed or interface limitations) tags and display their innertext as-is?

  116. lovetox

    50% of xhtml-im i dont want to support

  117. Link Mauve

    This isn’t HTML, this is proper XHTML.

  118. Link Mauve

    lovetox, pango’s markup format is quite close to HTML fwiw.

  119. Link Mauve

    opal, correct.

  120. opal

    awesome, so 0394's start/end annotations are overkill and prone to more developer error in a sense

  121. Link Mauve

    opal, see XEP-0071 example 8.

  122. opal

    > and it does not really matter if you build upon html, or some new invented language even 0393 is "some [...] invented language" but not new as you mentioned before, and it requires its own parsing, so i dont see how a revised 0071 would be any different, and certainly 0394 would require much of the same

  123. opal

    Link Mauve, ah so the plaintext preserves semantics of some tags in this case, at the cost of duplicating the entire message body

  124. opal

    that is one perk of 0394, deduplication, but assuming stanzas are compressed over the wire, this might not be a huge concern either way

  125. opal

    > 50% of xhtml-im i dont want to support i dont blame you

  126. Zash

    isn't it divided into modules?

  127. lovetox

    opal, but stanzas are not compressed

  128. opal

    well damn :D

  129. Zash

    html and compression are both security hazards that we removed

  130. opal

    me and my assumptions

  131. opal

    is, say, stanza-level zlib compression a security hazard? i thought it was just TLS compression that was a mistake

  132. Zash

    https://blog.thijsalkema.de/blog/2014/08/07/https-attacks-and-xmpp-2-crime-and-breach/

  133. opal

    ty

  134. opal

    so BREACH and not CRIME is what im looking into

  135. opal

    >If you absolutely have to use compression, disable TLS compression and use XEP-0138 and do a full flush after every stanza. that makes perfect sense ok, now i see how theyre both an equal concern

  136. lovetox

    this method to simply ignore tags would work pretty badly for the case of lists for example

  137. Zash

    make a list of all the block elements, if you don't understand more than that treat them as <div>, assume anything else are <span>

  138. Zash

    or just turn anything unknow into <span>-equivalents and send newlines and whitespace that makes sense if all tags are stripped

  139. opal

    since xmpp preserves whitespace unlike "real" (x)html, it'd probably suffice for the sender to have each <li/> on its own line, but then you lose the numbering/bulleting information

  140. opal

    as an anecdote, html5's <q/> tag is a blessing and a curse, seeing as css is required to change what those quotes actually are, and without css, semantic information is lost

  141. jonas’

    lovetox, fwiw, '394 has the same issue.

  142. Zash

    tho then it's probably marginally more explicit that you should make the <body> make sense without the formatting?

  143. MSavoritias (fae,ve)

    isnt that the case anyway? that a client needs to implement the whole markup xep otherwise there needs to be a good fallback?

  144. opal

    0394 seems like it wouldnt lend way to lists of any type since the * or the 1. 2. 3. are part of the original body still

  145. opal

    we could be dicks and make the server implementations translate lists and such to plaintext variants :D

  146. opal

    for clients that dont advertise support

  147. MSavoritias (fae,ve)

    personally it would make sense to reuse xhtml in other places too.

  148. pep.

    "for clients that dont advertise support" someday I'd really like to be able to do this again. For now you'll just get answers like "something carbons something MAM"

  149. MSavoritias (fae,ve)

    but maybe its too late for that

  150. MSavoritias (fae,ve)

    kind of like core xep and extensions but alas something something cant have nice things

  151. opal

    >someday I'd really like to be able to do this again. For now you'll just get answers like "something carbons something MAM" not really clear what youre responding to but the mere existence of e2ee makes the server unable to do anything to modify the messages anyway; it was just a joke lol

  152. pep.

    What I meant is, in the context of unencrypted content, it's often hard to predict what kind of device will read what you send. If at the time of sending all recipient's online devices support the feature, nothing guarantees that they aren't going to fire up another device that doesn't, and fetch history

  153. opal

    yeah

  154. pep.

    (Well and it's the same for encrypted content anyway, no difference there)