This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Revert "feat($parse): secure expressions by hiding "private" properties" #4865
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.
Reverting change introduced by chirayuk which needs further discussion.
Check line 29 (26 after commit): "The goal is to prevent exploits against the expression language, but not to prevent exploits that were enabled by exposing sensitive JavaScript or browser apis on Scope."
But chirayuk's commit enforces a convention to regard all properties beginning or ending with underscore as private. Breaks every nonSQL db implementation i know, forcing overhead code.
While white-/blacklisting accessible properties for expressions is a nice feat, this is imho the wrong approach and does not add much in terms of security.
An attacker at this level is able to read everything on scope. The advocated change and the respective tests convey a false sense of security to unaware devs and will lead to complacency.
This reverts commit 3d6a89e.