mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
An expression like `force_bytes(chr(...))`, on Python 3 where the `force_bytes` finds itself with something to do because `chr` returns a text string, gives the UTF-8 encoding of the given value as a Unicode codepoint. Here, we don't want that -- rather we want the given value as a single byte. We can do that with `struct.pack`. This fixes an issue where the "Link with Webathena" flow was producing invalid credential caches when run on Python 3, breaking the Zephyr mirror for any user who went through it anew.
7.5 KiB
7.5 KiB