Open roosmaa opened 7 years ago
Hey @roosmaa, thanks for pointing this out. Could you please create a pull request for this issue?
@melbic You can cherry-pick this commit https://github.com/villoid/django-scarface/commit/277e7babda83c56812b428ff0e763feac6e198e2
In platform_strategy.py:
Usage of sys.getsizeof is fundamentally incorrect to measuring message length. getsizeof returns the internal size of the Python object, not the actual encoded size of the final message. TL;DR; it kind of works for ascii, but utterly breaks down for unicode strings.
Here's a quick demonstration from an interactive shell: