mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-11-29 08:27:15 +00:00
Finish rollout: user-visible size-cap failure, OOM-safe decode catch
- MediaSendingManager: surface a chat system message when a picked file exceeds the ~10 MiB send cap instead of silently dropping the send (voice/image/file paths), completing the 'user-visible failure' requirement of the rollout gate - BinaryProtocol: catch Exception instead of Throwable in decodeCore so OutOfMemoryError is never swallowed and masked as a parse failure - docs/file_transfer.md: mark the compressed-expansion rollout gate resolved; support for legacy >10 MiB compressed transfers is explicitly ended
This commit is contained in:
1 parent
b251812b9e
commit
c3bc911bcd
3 files changed
+26
-12
No files matched your search
@@ -107,7 +107,7 @@ source-route metadata. It does not imply multi-gigabyte mesh transfer support.
|
||||
transport threshold; the data portion is at most 469 bytes and becomes
|
||||
smaller when recipient or source-route overhead is present.
|
||||
|
||||
#### Compressed expansion rollout gate (draft/HOLD)
|
||||
#### Compressed expansion rollout gate (resolved)
|
||||
|
||||
Android's bounded decoder applies the same 10 MiB expanded-payload ceiling to every outer
|
||||
message type. It also requires a non-empty compressed body, an exact declared output size, and a
|
||||
@@ -116,10 +116,11 @@ attacker-controlled before packet signature verification, and the current receiv
|
||||
inflate before it can perform that verification.
|
||||
|
||||
New Android senders cap files just below 10 MiB (reserving envelope overhead) and refuse to encode
|
||||
any payload above the receiver ceiling.
|
||||
Legacy Android senders can still produce a highly compressible public file between 10 MiB and their
|
||||
50 MiB UI limit that the bounded decoder rejects. Grandfathering 50 MiB is not safe after only a type
|
||||
check: inflation allocates the declared payload and
|
||||
any payload above the receiver ceiling; exceeding the cap surfaces a user-visible error in chat.
|
||||
Support for legacy >10 MiB compressed transfers is explicitly ended: legacy Android senders can
|
||||
still produce a highly compressible public file between 10 MiB and their 50 MiB UI limit that the
|
||||
bounded decoder rejects. Grandfathering 50 MiB is not safe after only a type check: inflation
|
||||
allocates the declared payload and
|
||||
`BitchatFilePacket.decode` currently copies the content again, creating a greater than 100 MiB peak
|
||||
for a maximum-size transfer.
|
||||
|
||||
|
||||
Reference in new issue
Block a user