when i send a stanza over the size limit, is the stream ended by the server?
BASSGODhas left
lovetox
or is simply an error returned
Alexhas joined
moparisthebest
Stream has to be ended
moparisthebest
Well... In practice that's always going to be what happens
Zash
the stream is ended, along with all state, your user, your homework, your dog!
Zash
ALL ENDS
Zash
/s :)
lovetox
what was the rational behind that?
Zash
But stream and (xep-0198) session is unrecoverable
moparisthebest
In theory the server could read the rest of your huge stanza to /dev/null and return an error but seems funny
lovetox
why not simply reject that one stanza?
nicocohas left
moparisthebest
How do you know it's gonna end?
moparisthebest
What if it's an unlimited length stanza
lovetox
ok, i understand, we need to abort the read, and we dont know how much else was behind that stanza
Zash
What is communicated is the hard limit. It existed already, but now you know it.
lovetox
could be multiple stanzas
Zash
No behavior changes.
lovetox
and then we are in an inconsistent state
lovetox
Zash, the behavior changes on client side
Zash
Only that you can now take steps to avoid being brutally </stream>'d when you send something too big
lovetox
i need to decide if i let a user send a stanza over the limit, or reject it
Zash
You can raise an exception earlier before the stanza actually kills the stream.
lovetox
so because stream end is rather bad, the lib should not send a stanza over the limit
Zash
This was already what happened if you hit the limit.
Zash
You just got </stream>'d as a random surprise before.
lovetox
yes, but my thinking was, if the server does not end the stream, simply returns an error
Zash
No
lovetox
then a lib does not need to check
BASSGODhas joined
Zash
I don't see how this is possible with the current parser stack.
lovetox
im not saying it is possible
lovetox
i didnt know
Zash
nor do I want it to be possible
nicolahas left
singpolymahas left
lovetox
and i asked to decide on the behavior of the lib
singpolymahas joined
Zash
Wasn't someone working on this, for nbxmpp even?
Zash
They were asking in the Prosody channel the other day.
lovetox
yes i have a MR, and need to review it :)
lovetox
its a rather big change, because suddenly the send() method can raise an exception when it was not possible before ..
mjk
👀
Zash
yes. those kinds of changes are "fun" to review, when the ground may change below your feet
Zash
couldn't the send() method fail before?
mimi89999has left
Zash
like, the socket turned out to have been broken or something
mimi89999has joined
Zash
altho stream management could absorb that
mjk
it's async, so... it's complicated
lovetox
its just much work, many parts call send_stanza() and this method did not raise exceptions, and now it does, so you need to wrap many calls in try/except blocks
Zash
mmmm, and I'm not sure I've finished all that behavior in Prosody yet. it has the same kind of problem with s2s connections
mjk
the only exceptions send() could generate before are type system related, I think :D
singpolyma
Even more fun, send something under your c2s limit but over your peer's s2s and get the whole s2s stream terminated for everyone!
moparisthebest
Exceptions were a mistake :)
Zash
singpolyma, but now you can know that something is over the limit and turn it into a stanza error before sending it :)
Zash
you could do something like that internally in a client too
MattJ
XEP-0478 <3
singpolyma
Zash: how would you know? Since the limit is set by up to two remote parties who don't tell you their limits
Zash
singpolyma, seen https://xmpp.org/extensions/xep-0478.html ?
Zash
working name "Path MTU" :)
MattJ
singpolyma, if everyone supports '478 then there is no stream closure case now
moparisthebest
Yep, very excited about that
singpolymahas left
singpolymahas joined
singpolyma
Oh I see, that does indeed fix the s2s case I mentioned
neshtaxmpphas left
neshtaxmpphas joined
neshtaxmpphas left
BASSGODhas left
ralphmhas joined
neshtaxmpphas joined
Tobiashas left
pablohas joined
Tobiashas joined
wladmishas left
wladmishas joined
Tobiashas left
Tobiashas joined
Tobiashas left
Tobiashas joined
Tobiashas left
Tobiashas joined
singpolymahas left
singpolymahas joined
xnamedhas joined
singpolymahas left
singpolymahas joined
BASSGODhas joined
ira.testerhas left
BASSGODhas left
BASSGODhas joined
xnamedhas left
xnamedhas joined
Tobiashas left
Tobiashas joined
Tobiashas left
Tobiashas joined
mjkhas left
Tobiashas left
Tobiashas joined
Tobiashas left
Tobiashas joined
florettahas left
nicocohas joined
Sevehas left
Tobiashas left
Tobiashas joined
Sevehas joined
florettahas joined
jgarthas left
papatutuwawahas joined
zonsopkomsthas left
zonsopkomsthas joined
adiaholichas left
poliuxhas left
adiaholichas joined
singpolymahas left
mjkhas joined
singpolymahas joined
wladmishas left
wladmishas joined
stphas left
singpolymahas left
singpolymahas joined
Wojtekhas left
MSavoritias (fae,ve)has left
zonsopkomsthas left
Mikaelahas left
deimoshas left
xnamedhas left
BASSGODhas left
nicolahas joined
singpolymahas left
singpolymahas joined
arcxihas left
gooyahas left
neshtaxmpphas left
neshtaxmpphas joined
florettahas left
gooyahas joined
deimoshas joined
arcxihas joined
gooyahas left
papatutuwawahas left
singpolymahas left
singpolymahas joined
BASSGODhas joined
resolihas left
matthiashas joined
florettahas joined
nicolahas left
gooyahas joined
resolihas joined
gooyahas left
singpolymahas left
singpolymahas joined
asterixhas left
jjrhhas left
asterixhas joined
singpolymahas left
singpolymahas joined
resolihas left
neshtaxmpphas left
neshtaxmpphas joined
papatutuwawahas joined
debaclehas joined
BASSGODhas left
neshtaxmpphas left
neshtaxmpphas joined
asterixhas left
asterixhas joined
krithas left
BASSGODhas joined
Kevhas joined
Kevhas left
resolihas joined
deimoshas left
deimoshas joined
pablohas left
resolihas left
resolihas joined
eevvoorhas left
Maranda[x]has left
singpolymahas left
florettahas left
singpolymahas joined
Maranda[x]has joined
emus
*The XMPP Newsletter April 2023*
https://xmpp.org/2023/05/the-xmpp-newsletter-april-2023/