avatar/attachment image uploads fail on macOS (RLIMIT_AS setrlimit)
tsk-e30xy69vskpx Open fix
On macOS, resource.setrlimit(resource.RLIMIT_AS, (memory, memory)) in avatar_decode._limit (avatar_decode.py:339) raises ValueError ("current limit exceeds maximum limit" - macOS has a fixed address-space limit that cannot be raised). With the default memory budget (512 MB > 0), this is caught at avatar_decode.py:387-390 and turned into "undecodable", so every avatar and attachment image upload is refused on macOS. Linux is unaffected (RLIMIT_AS is settable there).
Suggested fix: wrap the RLIMIT_AS setrlimit in try/except (skip it on platforms where it cannot be raised), or use a per-platform limit (RLIMIT_DATA / RLIMIT_RSS where available).