Subject: | JSONP support introduces serious security problems |
Before JSONP has been introduced as serializer it was not possible to
get the serialized content from a foreign website due to the same origin
policy.
But now that you can choose JSONP as a serializer you can easily add
this to a foreign website to get the data from your REST controller:
<script
src="http://yourwebsite.com/rest_controller/get_all_users?content-type=text/javascript"></script>
This is probably the reason why JSONP has been added but it also adds a
serious security problem. I disabled JSONP in all of my REST controllers
but there might be others out there which do not know of this change and
all their data is exposed to any website on the net.
I propose that JSONP should be disabled by default.