Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 4969548

Browse files
mirabilospetebacondarwin
authored andcommitted
docs(guide/Security): warn about $http.jsonp()
Warn users about security issues with JSONP that are *not* mitigated by AngularJS Closes #14727
1 parent 418fb9c commit 4969548

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/content/guide/security.ngdoc

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Protection from JSON Hijacking is provided if the server prefixes all JSON reque
8787
Angular will automatically strip the prefix before processing it as JSON.
8888
For more information please visit {@link $http#json-vulnerability-protection JSON Hijacking Protection}.
8989

90+
Bear in mind that calling `$http.jsonp`, like in [our Yahoo! finance example](https://docs.angularjs.org/guide/concepts#accessing-the-backend),
91+
gives the remote server (and, if the request is not secured, any Man-in-the-Middle attackers)
92+
instant remote code execution in your application: the result of these requests is handed off
93+
to the browser as regular `<script>` tag.
9094

9195
## Strict Contextual Escaping
9296

0 commit comments

Comments
 (0)