-
EggToast2
Maybe yeah, but I'm more referring to LINE
-
EggToast2
LINE makes you grab a small snippet from their garbo streaming service, MySpace lets you do really anything
-
EggToast2
Can we start to not use base64 and very low stanza limits at the same time?
-
moparisthebest
what's the alternative ?
-
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?
-
lovetox
Your client should scale down the avatar, or your server should set a reasonable stanza limit
-
EggToast2
Oh, client scaling down the avatar. Makes sense, former was on Psi while latter was on monocles/conversations.
-
kuyuhi
even then, animated avatars easily hit stanza limits. hopefully someday we'll have http-based avatars like any other media does nowadays
-
EggToast 2
Mhm, that would work too. Even better potentially?
-
EggToast 2
Hmmm If HTTP is good because multiple streams, why don't we have multiple XMPP streams?
-
moparisthebest
you can, both with TLS and QUIC (where it's free)
-
lovetox
What would this change the same stanza limit applies
-
EggToast 2
Oh, right. Forgot about that...
-
projectmoon
Multiple streams are sexy
-
projectmoon
But how does it work in practice
-
projectmoon
Just assume you get stanzas from any connection? Or is it one connection for specific sets of stanzas?
-
lovetox
The later
-
lovetox
E.g. a stream per MUC
-
projectmoon
That would be nice
-
projectmoon
But server would need to support right?
-
lovetox
No .. you can open as many streams to a server as you want
-
lovetox
That's what we call multi device capability
-
lovetox
But it can be made more elegant
-
projectmoon
Oh
-
projectmoon
So this is a thing that exists
-
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
-
lovetox
Depends on what you do, if you send no presence on a connection to the server it will not Route messages to you
-
EggToast 2
Oh, that's good
-
lovetox
Though to join a MUC you need to send directed presence l, not sure how a server interprets that
-
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 -
lovetox
https://sekurak.pl/grozny-atak-na-szyfrowany-komunikator-gajim-przez-luke-w-kde-plasma/
-
lovetox
You need to translate , but describes how via avatar and url handlers rce can happen with an example for Gajim
-
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 ?
-
lovetox
You sanitize the url
-
lovetox
We do this already for filenames when we store files
-
lovetox
Because you can also hide obfuscate the file extensions with this
-
moparisthebest
sanitize how ?
-
lovetox
Remove the char from the url
-
moparisthebest
which char? isn't the RTL the problem ?
-
lovetox
That's a char
-
moparisthebest
but sometimes for some languages a valid one no ? I didn't think you could just always remove it ?
-
vpzom
also, it's not even part of the URL, right?
-
lovetox
I didn't look into it in detail, is it at the end? I thought it's in the middle
-
lovetox
I see no use case for having it in the moddle✎ -
lovetox
I see no use case for having it in the middle ✏
-
vpzom
u202etelnet:.cache/gajim/avatars/HASH_SHA1%00/moc.x//:sptth
- vpzom
- vpzom
- vpzom retracted a previous message, but it's unsupported by your client.
- vpzom retracted a previous message, but it's unsupported by your client.
-
vpzom
it's placed before the link
-
vpzom
even without all this, some users might not look at the URL scheme
-
lovetox
Yeah but that's a user problem, and I guess KDE fixes the bug where it pipes stuff to bash
-
lovetox
So if a link ends in a reversed URI scheme its dubious?
-
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
-
lovetox
RTL is and always will be a pain
-
lovetox
If it would be at least either or
-
lovetox
But no some users want to write RTL while there env is on something different✎ -
lovetox
But no some users want to write RTL while theire env is on something different ✏
-
lovetox
But no some users want to write RTL while their env is on something different ✏
-
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...
-
vpzom
there's nothing special about the URL, only the context in which it's displayed
-
vpzom
which doesn't matter on a website since the link text could be anything
-
vpzom
browsers do prompt users before opening other programs though
-
moparisthebest
browsers let you see the URL destination before clicking it though
-
vpzom
that too
-
moparisthebest
does it show https://... or telnet://... for this ?
-
vpzom
telnet
-
vpzom
since the RTL override is not part of the URL at all
-
moparisthebest
but that's probably just by luck of showing it in a separate place ?
-
vpzom
yeah
-
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
-
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
-
lovetox
we are thinking about solutions but its not trivial
-
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
-
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
-
moparisthebest
please do document what you end up doing somewhere even if it's just pasted into wiki.xmpp.org
๐ 1 -
lovetox
i dont think this was a particular hard challenge, the challenge is usually to execute it
-
moparisthebest
if you can prevent being able to create a file at a known path that would be better than nothing
-
lovetox
i also dont understand the flow that user do in countries where they have RTL
-
lovetox
when would they insert this character?
-
lovetox
this would be just useful if i want mixed content or? but why would users on IM Platforms want to have mixed text
-
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 :/
-
lovetox
it seems the problem is for people that write in some chats RTL and in others english (LTR)
-
lovetox
they need to configure the env for one or the other
-
lovetox
this would not matter for latin characters because they are always defined LTR
-
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
-
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"
-
lovetox
to fix that, they insert the LTR mark before the period, tho force it to LTR
-
moparisthebest
maybe fix is as simple as URLs should never be displayed RTL ?
-
moparisthebest
where's our RTL expert...
-
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
-
meson
I do have friends from Israel I could ask.
-
moparisthebest
same, interested to find out though
-
moparisthebest
hrm sch isn't here now, let's see if we can summon him *cough* pubsub atom rss
๐ 3 -
lovetox
but what about my idea, to check if the end of the link is a reversed uri scheme
-
lovetox
btw the link in the article does not work anymore
-
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
-
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? ↺
-
moparisthebest
you mean you uh totally fixed that on purpose ? congrats !
-
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 ↺
-
projectmoon
So the bug is that it uses RTL mode with a malicious URL written "backwards?"
-
meson
โฎtelnet:.cache/gajim/avatars/HASH_SHA1%00/gro.mijag//:sptth
-
meson
https://share.conversations.im/meeson_/message/Rf4Krxp6BydB8l2Y/Bildschirmfoto_20260831_183138.png
-
projectmoon
Hmm
-
projectmoon
And this would trigger a telnet URI
-
lovetox
> works for me here yes i did it wrong, it still works ↺
-
lovetox
but i used the longer one, they obfuscate the path by percent encoding it
-
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) ↺
-
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 ↺
-
meson
mmm, well okay it does not like the encoded chars % here:
-
meson
https://share.conversations.im/meeson_/message/Eg6Fuvwuyq1pi4wC/Bildschirmfoto_20260831_183403.png
-
lovetox
no you did it also wrong
-
lovetox
you cannot copy that from the site
-
meson
:D
-
lovetox
you need to reverse that string, and then post it with RTL
-
lovetox
because the string just reversed, is not a valid url because the percent encodings are wrong
๐ก 1 -
lovetox
they posted how the result looks on the site, not how they put it into the application
-
projectmoon
Are RTL strings still left to right as far as the actual raw UTF8 bytes are concerned?
-
projectmoon
Like you don't need to iterate backwards.
-
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
-
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`✎ ↺ -
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 ✏ ↺
-
meson
โฎโ 202Eโ Lโ 004Cโ Tโ 0054โ Rโ 0052
-
meson
which is still RTL, when I paste it here. I am confused
-
lovetox
i would expect on the wire everything is LTR
-
lovetox
so the bytes are left to right parsed
-
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.
-
dwd
The wire in neither LTR nor RTL, technically. You just think it's LTR because that's your normal reading direction.
๐๏ธ 1 -
dwd
(For an Arabic speaker, say, they'd think that English was written RTL on the wire)
-
Holger
Obviously depends on which direction the wire is laid.
๐ 2 -
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? ↺
-
dwd
Well, I assumed you read characters in order, so yes?
-
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 ↺
-
projectmoon
> lua rejects this question entirely We don't talk about that ↺
๐ 1 -
projectmoon
> Obviously depends on which direction the wire is laid. Lol ↺
-
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
-
lovetox
the input would need to return the characters in the order the user typed them
-
dwd
ูุง ุฃูุนูุฑูู
-
lovetox
it does not matter on what side of the input they are added
-
dwd
But I would expect it in the same order - so the ู then ุง and so on.
-
dwd
(Given Arabic orthography that's not helpful, actually, but those are the rightmost and second-rightmost characters)
-
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) ↺
-
lovetox
but you cannot say this by just looking at a string how it will end up on the wire
-
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
-
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)
-
lovetox
yes under the assumption that nobody uses Left-Right Marks (Invisible Control Characters) to change the order
-
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
-
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