Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

maxwellium
Copy link

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.

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."

Chirayuk's commit enforces 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.
@petrjasek
Copy link

👍 having the issue with nosql on the server (python-eve.org)

@blubaugha
Copy link

:+1: I would like to see this change reverted so that I can keep my Mongoose/MongoDb queries lean

@ghost ghost assigned chirayuk Nov 12, 2013
@plus-
Copy link

plus- commented Nov 13, 2013

👍

@geddski
Copy link
Contributor

geddski commented Nov 14, 2013

Also caused problems when binding to third party data from tables with column headers that start with underscore. Revert seems like a good idea until the problem can be thought through more thoroughly.

@vojtajina vojtajina closed this in 4ab16aa Nov 14, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS
style. We didn't realize how many people will be affected by this change.

We might introduce this feature in the future, probably under a config option, but it needs more
research and so I'm reverting the change for now.

This reverts commit 3d6a89e.

Closes angular#4926
Closes angular#4842
Closes angular#4865
Closes angular#4859
Closes angular#4849

Conflicts:
	src/ng/parse.js
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this pull request Jan 27, 2014
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS
style. We didn't realize how many people will be affected by this change.

We might introduce this feature in the future, probably under a config option, but it needs more
research and so I'm reverting the change for now.

This reverts commit 3d6a89e.

Closes angular#4926
Closes angular#4842
Closes angular#4865
Closes angular#4859
Closes angular#4849

Conflicts:
	src/ng/parse.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants