https://bugs.kde.org/show_bug.cgi?id=505543
Joshua Goins <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit| |https://invent.kde.org/netw | |ork/tokodon/-/commit/4cc37a | |05142dad8e461d120cecdae1894 | |82daf8a Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Joshua Goins <[email protected]> --- Git commit 4cc37a05142dad8e461d120cecdae189482daf8a by Joshua Goins, on behalf of Asish Kumar. Committed on 11/11/2026 at 14:07. Pushed by redstrate into branch 'release/26.12'. Clamp oversized instance character limits instead of treating them as zero QJsonValue::toInt() returns 0 for numbers that don't fit into an int. An instance configured with an absurdly large character limit (for example 18446744073709552000, as in the report) therefore made Tokodon believe that the maximum post length was 0. The composer then showed a negative "x/0" character count and permanently disabled the post button. Read max_characters (v1/v2 instance endpoints) and Pleroma's max_toot_chars through a helper that clamps values above INT_MAX to INT_MAX, so such instances remain usable. Add a test using an instance response with an oversized limit; it fails without this change. (cherry picked from commit 8d618ad5b8d12e9d7644c52ffeb96498ea4e72f8) M +20 -3 src/account/abstractaccount.cpp M +15 -0 src/autotests/accounttest.cpp A +213 -0 src/autotests/data/api_v2_instance_huge_character_limit.json https://invent.kde.org/network/tokodon/-/commit/4cc37a05142dad8e461d120cecdae189482daf8a -- You are receiving this mail because: You are watching all bug changes.
