Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
a6f76a9d by Philipp Hörist at 2026-08-23T23:52:21+02:00
cfix: Don't validate base64 payloads

- - - - -


1 changed file:

- nbxmpp/util.py


Changes:

=====================================
nbxmpp/util.py
=====================================
@@ -61,7 +61,9 @@ def b64decode(data: str | bytes) -> bytes:
     if isinstance(data, str):
         data = data.encode()
 
-    return base64.b64decode(data, validate=True)
+    # Don't validate base64 data because in XMPP whitespace in
+    # base64 payloads must be accepted
+    return base64.b64decode(data)
 
 
 def b64encode(data: str | bytes) -> str:



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/a6f76a9df2edaac55a48504985b4103da3bef526

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/-/commit/a6f76a9df2edaac55a48504985b4103da3bef526
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to