jdev - 2024-06-19

  1. MSavoritias (fae,ve)

    base64 that is used in XMPP is just an encoding right? so essentially any other format that allows me to encode "stuff" (like pictures and videos and whatever encrypted things) into a format would work as an alternative. as long as its specified of course

  2. MSavoritias (fae,ve)

    hmm reading the RFC actually it seems that it would so maybe I will go ahead and do that

  3. Kev

    Base64's just a way of representing binary data in text.

  4. Kev


  5. MSavoritias (fae,ve)

    right makes sense. the thing i am reading talks about "blocks" so i am guessing its just the packets over the network

  6. MSavoritias (fae,ve)

    so probably same thing that xmpp can just support

  7. MattJ

    The main thing XMPP can't support is \0, which has no valid XML encoding. Anything that is fine with that could be used instead of base64, but base64 is the most widely used standard for binary-in-text-streams..

  8. Kev

    Well, and XML.

  9. Kev

    (I realise you can encode the XML entities, just need to do so)

  10. jonas’

    MattJ, nitpick: all ASCII control characters except whitespace are forbidden in XMPP character data (i.e. not encodable).

  11. jonas’

    not just \0

  12. MattJ

    XMPP? I said XML :)

  13. jonas’

    well, both

  14. jonas’

    XML 1.0 forbids them (XML 1.1 allows them, but XMPP is strictly based on XML 1.0)

  15. MattJ


  16. MattJ

    It's just a discussion happened in another MUC earlier about switching XMPP to EXI in order to eliminate the need for base64. I think we have options before obtaining a sledgehammer to crack a nut.

  17. moparisthebest

    Does exi eliminate the need for base64 ?

  18. jonas’

    nobody knows, the spec is too dense

  19. jonas’

    (though I think it in fact can)

  20. moparisthebest

    I really doubt it does, why would it change the text content in tags

  21. MattJ

    It would be weird if it allowed encoding invalid XML

  22. jonas’

    am I confusing that with cbor where you can tell the library you're expecting binary and then you'll get the raw data, otherwise it'll wrap it around base64 for you (when the schema says it's base64)?

  23. moparisthebest

    There are other actually good ways to transfer binary without trying to cram it into size-limited XMPP stanzas

  24. Trung

    sorry what is "exi" ?

  25. moparisthebest

    But from talking to a few it seems like the Venn diagram of the "base64 bad" vs "using any other protocol to complement XMPP is bad" people is just a circle

  26. MattJ

    Trung, Efficient XML Interchange, a binary encoding of XML: https://en.wikipedia.org/wiki/Efficient_XML_Interchange

  27. Trung

    oh thank you

  28. singpolyma

    > XML 1.0 forbids them (XML 1.1 allows them, but XMPP is strictly based on XML 1.0) Wait, XML1.1 allows them? As entities I guess?

  29. singpolyma

    moparisthebest: I agree with you, but we have so many cases where we're doing the base64 thing. AFAIK the only protocols stuck with this are us and smtp

  30. moparisthebest

    Right, but regardless of encoding, when you are sending length-limited stanzas around it doesn't make sense to put big files in them ever

  31. moparisthebest

    And we have plenty of actual good tools for the job of transferring big files... We should use them instead

  32. lovetox

    anyone with security labels implementation experience, if i read this correctly in https://xmpp.org/extensions/xep-0258.html the difference between a restrictive catalog and an unrestrictive, is just the server operator beeing to lazy to add one item to the catalog which has no label (meaning the client can send a message without adding a label). i tempted to assume if a server operator want that he should always add the empty item to the catalog instead of writing code that implicitly adds this if its unrestricted and the empty item is missing

  33. cal0pteryx

    Kev might have some insights :)

  34. Kev

    You can have a restrictive catalogue that doesn't have an unlabeled label.

  35. Kev

    And if it's unrestrictive, you shouldn't require there to be an item with no label in order to allow messages without a label.

  36. lovetox

    why Kev? whats the Use Case for the Admin to not add a empty item to the unrestrictive cataloge?

  37. lovetox

    other than laziness

  38. lovetox


  39. lovetox

    maybe to allow clients to write messages which do not support security labels

  40. lovetox

    hm yeah thats a pretty good reason

  41. lovetox

    hm no .. if its unrestrictive the server does anyway accept message without label

  42. lovetox

    im back to, there is no reason for the admin to not add that item