jdev - 2026-08-31


  1. EggToast2

    Maybe yeah, but I'm more referring to LINE

  2. EggToast2

    LINE makes you grab a small snippet from their garbo streaming service, MySpace lets you do really anything

  3. EggToast2

    Can we start to not use base64 and very low stanza limits at the same time?

  4. moparisthebest

    what's the alternative ?

  5. EggToast2

    I don't really know, but keeping this isn't good either. I don't like it when setting avatar of MUCs disconnects me... but user avatar doesn't? Wait, is this a server bug?

  6. lovetox

    Your client should scale down the avatar, or your server should set a reasonable stanza limit

  7. EggToast2

    Oh, client scaling down the avatar. Makes sense, former was on Psi while latter was on monocles/conversations.

  8. kuyuhi

    even then, animated avatars easily hit stanza limits. hopefully someday we'll have http-based avatars like any other media does nowadays

  9. EggToast 2

    Mhm, that would work too. Even better potentially?

  10. EggToast 2

    Hmmm If HTTP is good because multiple streams, why don't we have multiple XMPP streams?

  11. moparisthebest

    you can, both with TLS and QUIC (where it's free)

  12. lovetox

    What would this change the same stanza limit applies

  13. EggToast 2

    Oh, right. Forgot about that...

  14. projectmoon

    Multiple streams are sexy

  15. projectmoon

    But how does it work in practice

  16. projectmoon

    Just assume you get stanzas from any connection? Or is it one connection for specific sets of stanzas?

  17. lovetox

    The later

  18. lovetox

    E.g. a stream per MUC

  19. projectmoon

    That would be nice

  20. projectmoon

    But server would need to support right?

  21. lovetox

    No .. you can open as many streams to a server as you want

  22. lovetox

    That's what we call multi device capability

  23. lovetox

    But it can be made more elegant

  24. projectmoon

    Oh

  25. projectmoon

    So this is a thing that exists

  26. EggToast 2

    Yeah, but isn't this for having multiple devices, not having a single device that has multiple connections? You'd still receive all incoming events on all connections

  27. lovetox

    Depends on what you do, if you send no presence on a connection to the server it will not Route messages to you

  28. EggToast 2

    Oh, that's good

  29. lovetox

    Though to join a MUC you need to send directed presence l, not sure how a server interprets that

  30. singpolyma

    > Hmmm > If HTTP is good because multiple streams, why don't we have multiple XMPP streams? And yet every webdev's job for years was to reduce number of streams with crazy hacks like CSS sprites

    ๐Ÿ˜ญ 1
  31. lovetox

    https://sekurak.pl/grozny-atak-na-szyfrowany-komunikator-gajim-przez-luke-w-kde-plasma/

  32. lovetox

    You need to translate , but describes how via avatar and url handlers rce can happen with an example for Gajim

  33. moparisthebest

    > below the output content of the link: > > [Znak RTLO] telnet:.cache/gajim/avatars/HASH_SHA1%00/moc.x//:sptth > > Ready to ship, the darkened link may look like this: > https://x.com/00%317076d6aadee1744dbdcdcfaf0a7295f6cc479/s27%at16%va/miA6%ag/eh36%aceE2%:tenlet > > Thanks to the RTLO sign, the victim in the Gajima chat window will see a seemingly safe link, looking like a standard address starting with https://. that's awesome and terrifying, how do you defend against this ?

  34. lovetox

    You sanitize the url

  35. lovetox

    We do this already for filenames when we store files

  36. lovetox

    Because you can also hide obfuscate the file extensions with this

  37. moparisthebest

    sanitize how ?

  38. lovetox

    Remove the char from the url

  39. moparisthebest

    which char? isn't the RTL the problem ?

  40. lovetox

    That's a char

  41. moparisthebest

    but sometimes for some languages a valid one no ? I didn't think you could just always remove it ?

  42. vpzom

    also, it's not even part of the URL, right?

  43. lovetox

    I didn't look into it in detail, is it at the end? I thought it's in the middle

  44. lovetox

    I see no use case for having it in the moddle

  45. lovetox

    I see no use case for having it in the middle

  46. vpzom

    u202etelnet:.cache/gajim/avatars/HASH_SHA1%00/moc.x//:sptth

  47. vpzom

  48. vpzom

  49. vpzom retracted a previous message, but it's unsupported by your client.

  50. vpzom retracted a previous message, but it's unsupported by your client.

  51. vpzom

    it's placed before the link

  52. vpzom

    even without all this, some users might not look at the URL scheme

  53. lovetox

    Yeah but that's a user problem, and I guess KDE fixes the bug where it pipes stuff to bash

  54. lovetox

    So if a link ends in a reversed URI scheme its dubious?

  55. moparisthebest

    I think the "gajim bug" is just that it displays the wrong URL to the user, but I suspect it affects all clients hence the "how do you defend against this?" question, I have no idea

  56. lovetox

    RTL is and always will be a pain

  57. lovetox

    If it would be at least either or

  58. lovetox

    But no some users want to write RTL while there env is on something different

  59. lovetox

    But no some users want to write RTL while theire env is on something different

  60. lovetox

    But no some users want to write RTL while their env is on something different

  61. moparisthebest

    I wonder how eg firefox/chrome displays such a URL, and if they've solved this problem how easy it'd be to figure out how...

  62. vpzom

    there's nothing special about the URL, only the context in which it's displayed

  63. vpzom

    which doesn't matter on a website since the link text could be anything

  64. vpzom

    browsers do prompt users before opening other programs though

  65. moparisthebest

    browsers let you see the URL destination before clicking it though

  66. vpzom

    that too

  67. moparisthebest

    does it show https://... or telnet://... for this ?

  68. vpzom

    telnet

  69. vpzom

    since the RTL override is not part of the URL at all

  70. moparisthebest

    but that's probably just by luck of showing it in a separate place ?

  71. vpzom

    yeah

  72. moparisthebest

    I have no idea what the right thing to do here is but it should probably be figured out and documented someplace shared maybe modernxmpp? cc MattJ

  73. moparisthebest

    lovetox: are you also fixing the "bug" "avatar code allows strangers to write arbitrary files to my system" ? might be good for defense in depth, unless checking file content opens up another vuln rofl

  74. lovetox

    we are thinking about solutions but its not trivial

  75. lovetox

    for simple formats like a png or jpeg we could load it into the image lib and encode it again, this probably gets rid of all non-image data

  76. lovetox

    but then again avatars is just one delivery mechanism, i bet there are countless others where you can get a specific file to someones harddisk

  77. moparisthebest

    please do document what you end up doing somewhere even if it's just pasted into wiki.xmpp.org

    ๐Ÿ‘ 1
  78. lovetox

    i dont think this was a particular hard challenge, the challenge is usually to execute it

  79. moparisthebest

    if you can prevent being able to create a file at a known path that would be better than nothing

  80. lovetox

    i also dont understand the flow that user do in countries where they have RTL

  81. lovetox

    when would they insert this character?

  82. lovetox

    this would be just useful if i want mixed content or? but why would users on IM Platforms want to have mixed text

  83. moparisthebest

    same, the easy fix for non-rtl users is just displaying a big scary "this person is probably trying to attack you" message and stripping it , but I have no idea how it should work for people who do want rtl sometimes :/

  84. lovetox

    it seems the problem is for people that write in some chats RTL and in others english (LTR)

  85. lovetox

    they need to configure the env for one or the other

  86. lovetox

    this would not matter for latin characters because they are always defined LTR

  87. lovetox

    but it seems there are neutral chars, like punctations, and if they are at the end or beginning they take the directionality of the env

  88. lovetox

    means if someone has their env set to RTL, and type a english sentence in the chat, it will look like this ".This is English"

  89. lovetox

    to fix that, they insert the LTR mark before the period, tho force it to LTR

  90. moparisthebest

    maybe fix is as simple as URLs should never be displayed RTL ?

  91. moparisthebest

    where's our RTL expert...

  92. lovetox

    maybe, im not sure what users do if the write hebrew, and post in the middle a latin url, if they reverse it, or leave it as it is

  93. meson

    I do have friends from Israel I could ask.

  94. moparisthebest

    same, interested to find out though

  95. moparisthebest

    hrm sch isn't here now, let's see if we can summon him *cough* pubsub atom rss

    ๐Ÿ˜ 3
  96. lovetox

    but what about my idea, to check if the end of the link is a reversed uri scheme

  97. lovetox

    btw the link in the article does not work anymore

  98. lovetox

    seems they used a old version of Gajim with better url detection, the current url detection stops somwhere in the middle, because its worse :D

  99. projectmoon

    > seems they used a old version of Gajim with better url detection, the current url detection stops somwhere in the middle, because its worse :D Task failed successfully?

  100. moparisthebest

    you mean you uh totally fixed that on purpose ? congrats !

  101. meson

    > seems they used a old version of Gajim with better url detection, the current url detection stops somwhere in the middle, because its worse :D works for me here

  102. projectmoon

    So the bug is that it uses RTL mode with a malicious URL written "backwards?"

  103. meson

    โ€ฎtelnet:.cache/gajim/avatars/HASH_SHA1%00/gro.mijag//:sptth

  104. meson

    https://share.conversations.im/meeson_/message/Rf4Krxp6BydB8l2Y/Bildschirmfoto_20260831_183138.png

  105. projectmoon

    Hmm

  106. projectmoon

    And this would trigger a telnet URI

  107. lovetox

    > works for me here yes i did it wrong, it still works

  108. lovetox

    but i used the longer one, they obfuscate the path by percent encoding it

  109. moparisthebest

    > So the bug is that it uses RTL mode with a malicious URL written "backwards?" one of the bugs yes, the one that likely affects all clients and where the fix isn't obvious (to me anyway)

  110. projectmoon

    > one of the bugs yes, the one that likely affects all clients and where the fix isn't obvious (to me anyway) Well Livewire does not render it as a clickable link. Probably because it doesn't have any RTL in mind lol

  111. meson

    mmm, well okay it does not like the encoded chars % here:

  112. meson

    https://share.conversations.im/meeson_/message/Eg6Fuvwuyq1pi4wC/Bildschirmfoto_20260831_183403.png

  113. lovetox

    no you did it also wrong

  114. lovetox

    you cannot copy that from the site

  115. meson

    :D

  116. lovetox

    you need to reverse that string, and then post it with RTL

  117. lovetox

    because the string just reversed, is not a valid url because the percent encodings are wrong

    ๐Ÿ’ก 1
  118. lovetox

    they posted how the result looks on the site, not how they put it into the application

  119. projectmoon

    Are RTL strings still left to right as far as the actual raw UTF8 bytes are concerned?

  120. projectmoon

    Like you don't need to iterate backwards.

  121. moparisthebest

    we need a bot you can send a request to that'll respond appropriately, that'll make testing all the clients easiest, if no one beats me I'll try to set this up tonight

  122. meson

    > Are RTL strings still left to right as far as the actual raw UTF8 bytes are concerned? typed u202eLTR, which yields RTL. The inspector says the label contains `โ€ฎโ€…202Eโ€…Lโ€…004Cโ€…Tโ€…0054โ€…Rโ€…0052`

  123. meson

    > Are RTL strings still left to right as far as the actual raw UTF8 bytes are concerned? typed u202eLTR, which yields RTL. The inspector says the label contains

  124. meson

    โ€ฎโ€…202Eโ€…Lโ€…004Cโ€…Tโ€…0054โ€…Rโ€…0052

  125. meson

    which is still RTL, when I paste it here. I am confused

  126. lovetox

    i would expect on the wire everything is LTR

  127. lovetox

    so the bytes are left to right parsed

  128. dwd

    The bytes within UTF-8 are in the same order, and the codepoints are in "reading" order, so for RTL the R-most would be first on the wire.

  129. dwd

    The wire in neither LTR nor RTL, technically. You just think it's LTR because that's your normal reading direction.

    ๐Ÿ‘†๏ธ 1
  130. dwd

    (For an Arabic speaker, say, they'd think that English was written RTL on the wire)

  131. Holger

    Obviously depends on which direction the wire is laid.

    ๐Ÿ˜‚ 2
  132. projectmoon

    > The bytes within UTF-8 are in the same order, and the codepoints are in "reading" order, so for RTL the R-most would be first on the wire. Yes but basically, index 0 is the first character regardless of reading order, right?

  133. dwd

    Well, I assumed you read characters in order, so yes?

  134. moparisthebest

    >> The bytes within UTF-8 are in the same order, and the codepoints are in "reading" order, so for RTL the R-most would be first on the wire. > Yes but basically, index 0 is the first character regardless of reading order, right? lua rejects this question entirely

  135. projectmoon

    > lua rejects this question entirely We don't talk about that

    ๐Ÿ˜‚ 1
  136. projectmoon

    > Obviously depends on which direction the wire is laid. Lol

  137. lovetox

    dwd, the bytes are in the order a client puts them there i would expect, so the question would be what a text input gives back the developer

  138. lovetox

    the input would need to return the characters in the order the user typed them

  139. dwd

    ู„ุง ุฃูŽุนู’ุฑูู

  140. lovetox

    it does not matter on what side of the input they are added

  141. dwd

    But I would expect it in the same order - so the ู„ then ุง and so on.

  142. dwd

    (Given Arabic orthography that's not helpful, actually, but those are the rightmost and second-rightmost characters)

  143. theTedd

    > Are RTL strings still left to right as far as the actual raw UTF8 bytes are concerned? The first character in the string (rendered rightmost) is first, so you can consider all characters to be encoded LTR, and it's up to the renderer to decide how to draw the strings (which includes switching direction according to which characters are used)

  144. lovetox

    but you cannot say this by just looking at a string how it will end up on the wire

  145. lovetox

    you can if you see the string in the application, and see its on the right side, then you can deduce how it was typed, and therefore deduce how programm will put it on the wire

  146. theTedd

    I haven't read all of the backlog, so maybe there's a separate issue; for Arabic specifically, rendering depends heavily on ligatures, so each rendered character depends on which characters appear before and after it, but there is a defined ordering and if you know Arabic then you will know which characters are there and the codepoints be encoded in sequence (rightmost first, leftmost last)

  147. lovetox

    yes under the assumption that nobody uses Left-Right Marks (Invisible Control Characters) to change the order

  148. theTedd

    You can potentially do interesting things using those, though I wonder how strongly renderers follow them given that they already need to work correctly even when they're not present

  149. theTedd

    And the true answer is: it's complicated - see https://en.wikipedia.org/wiki/Bidirectional_text#Unicode_bidi_support But yes, the encoded ordering is not necessarily clear from the visual ordering