omi icon indicating copy to clipboard operation
omi copied to clipboard

[Bounty proposal] fix(backend/updates): sanitize value error reflections and prevent internal state leaks ($50 proposed)

Open ElvinGts opened this issue 2 months ago • 1 comments

Following the contribution guide's invitation to propose paid work — @kodjima33, @josancamon19, would a US$50 bounty be appropriate for this? Proposed amount, not an existing award. Fix and tests are already up as PR #18910.

What problem is being solved?

In backend/routers/updates.py, caught ValueError exceptions across promote_beta_candidate, set_beta_admission, and multiple other endpoints reflected raw str(exc) directly into HTTP 409 responses. When state machine transition failures or internal database generation mismatch errors occur, internal exception strings and release ID states leaked to API clients.

What is the solution?

  1. Sanitized all ValueError handlers across updates endpoints using _sanitize_update_error to return structured machine-readable error keys.
  2. Added backend/tests/unit/test_updates_error_sanitization.py to ensure masking behavior.

Fix is implemented and tested in PR #18910.

ElvinGts avatar Sep 25 '26 13:09 ElvinGts

Closing as a duplicate of #18767. same ValueError detail=str(exc) in backend/routers/updates.py:1119; #18767 is the earlier open updates/imports issue

aryanorastar avatar Sep 27 '26 05:09 aryanorastar