|
|
|
|
|
by nihonium
3436 days ago
|
|
Biggest problem here is their architectural design. They're mixing server side code with front end. They're printing angular code using back end, but they are not filtering {} characters. Basically, user can execute any angular code, therefore any javascript. |
|
- Have the possibility of {{ and }} in your server-side output (or whatever symbols you configured Angular for)
- Have Angular.JS on a page with server-side output
Choose one.
It's important to realize that this affects things like user input as well. So form initials/form defaults can also be affected by this issue!
A bit of a silly way to fix this problem is to modify your server-side escaping function (surely you have this!) to "escape" {{ with {<zero-width space>{. This will mess up things that need to be equal to each other, and can poison user input (because of form initials) but will protect you from this issue.