feat(ses): enablements needed by (old?) mobx #2030
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #XXXX
refs: #2029
Description
This does not close #2029 , but it does close the first hurdle, the
problem. I have yet to diagnose or fix the
The problem fixed by this PR is interesting. The override mistake is in mobx generated code, where the corresponding mobx source code is a TypeScript class definition. The generated code is not a JS class definition, but rather, seems to target pre-class JS. The surprising mistake is that the generated code is initializing the methods on the "class" .prototype using assignment rather than
defineProperty
in blatant violation of the JS class semantics. Presumably, this is also a blatant violation of the current TS class semantics, but I don't know. Is some ancient TS compiler at play here? Or some non-standard TS or TS-like compiler? I don't know.Security Considerations
The errant TS class compilation is itself worrisome, both from general correctness and from security. But that issue is only revealed by this bug and PR, not affected by it. Nevertheless, we should try to understand what's going on, and to send upstream a mobx fix that repairs their class semantics. Since mobx is only a very indirect dependency of ours to which we do not impute any particular security properties, this is likely low urgency.
In the absence of this PR, as explained at #2029, much more violent inhibitions of SES's security were attempted (
unsafe-fast.js
) and might have been used in practice, resulting is a great loss of hardening and integrity protection. This PR makes that unnecessary, at least as far as this first #2029 problem which raised that possibility.Scaling Considerations
none
Documentation Considerations
none
Testing Considerations
none
Compatibility Considerations
none
Upgrade Considerations
none. Nothing breaking. Nothing that warrants a NEWS.md update.
*BREAKING*:
in the commit message with migration instructions for any breaking change.NEWS.md
for user-facing changes.