WIP: feat(media): add config to enable missing legacy media endpoints #1454

Draft
gamesguru wants to merge 4 commits from gamesguru/continuwuity:guru/fix/media-legacy-r0-endpoints into main

4 commits

Author SHA1 Message Date
ef2c6a8d4e restore deleted check_legacy_freeze functionality
Some checks failed
Documentation / Build and Deploy Documentation (pull_request) Has been skipped
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 6m10s
Checks / Prek / Clippy and Cargo Tests (pull_request) Failing after 20m9s
2026-03-03 18:52:46 +00:00
6e65a4e1e5 don't leak info on forbidden 2026-03-03 18:52:46 +00:00
a11fcb2fa9 fix: revert to fall thru to legacy only on Unrecognized 2026-03-03 18:52:46 +00:00
bdf3d793b2 feat(media): add config to enable missing legacy media endpoints
update config key descriptions in config/mod.rs

add speculative fixes for the following 404 ORB errors in SchildiChat web:

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from matrix.sp-codes.de: [404 / M_UNRECOGNIZED] Unrecognized request mxc=mxc://matrix.sp-codes.de/SpHUPhCGRnsYTFlyRYCDZhDD authenticated=true"}

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from hampai.ch: [401 / M_UNAUTHORIZED] no auth provided (required) mxc=mxc://hampai.ch/b291e6908914b64277b7ed0e1de87df5d52cac241958243044855644160 authenticated=true"}

enforce freeze_legacy_media on all legacy remote fetch paths

fix: fallback to unauthenticated media on more errors and safely return NotFound for empty media
2026-03-03 18:52:46 +00:00