This is a follow up to request #37545 (CVE-2024-30246).
The goal of this request is to take a decision so we can avoid the same class of issues again in the future and to do the minimal changes in the codebase so we can start acting on our decision.
This request will not take care of applying the changes on the whole codebase. This will need to done progressively where/when possible since it is going to be a very large chunk of work in any cases.