jquery/test
Michał Gołębiowski-Owczarek e7b3bc488d
Ajax: Drop the json to jsonp auto-promotion logic
Previously, `jQuery.ajax` with `dataType: 'json'` with a provided callback was
automatically converted to a jsonp request unless one also specified
`jsonp: false`. Today the preferred way of interacting with a cross-domain
backend is CORS which works in all browsers jQuery 4 will support.

Auto-promoting JSON requests to JSONP ones introduces a security issue as the
developer may be unaware they're not just downloading data but executing code
from a remote domain.

This commit disables the auto-promoting logic.

BREAKING CHANGE: to trigger a JSONP request, it's now required to specify
`dataType: "jsonp"`; previously some requests with `dataType: "json"` were
auto-promoted to JSONP.

Fixes gh-1799
Fixes gh-3376
Closes gh-4754
2020-07-27 19:15:57 +02:00
..
data Ajax: Drop the json to jsonp auto-promotion logic 2020-07-27 19:15:57 +02:00
integration Event: Fix delegated radio events when arrow keys are used 2015-10-18 13:06:37 -04:00
node_smoke_tests Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test 2019-03-04 18:30:51 +01:00
promises_aplus_adapters Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test 2019-03-04 18:30:51 +01:00
unit Ajax: Drop the json to jsonp auto-promotion logic 2020-07-27 19:15:57 +02:00
.eslintrc.json Build: Enable ESLint one-var rule for var declarations in browser code 2020-03-02 22:25:35 +01:00
delegatetest.html Tests: Change quotes according to style guidelines 2015-10-18 13:17:23 -04:00
hovertest.html Ref #13316: Sync all documents on full vs. minified source. Close gh-1147. 2013-02-07 15:16:28 -05:00
index.html Build: Use the US spelling of "favor" 2020-07-22 16:12:54 +02:00
jquery.js Build: Make dev mode work in Karma again, serve source files from disk 2020-01-08 00:35:55 +01:00
karma.context.html Build: Use the US spelling of "favor" 2020-07-22 16:12:54 +02:00
karma.debug.html Build: Use the US spelling of "favor" 2020-07-22 16:12:54 +02:00
localfile.html Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
middleware-mockserver.js Ajax: Drop the json to jsonp auto-promotion logic 2020-07-27 19:15:57 +02:00
networkerror.html Docs: Updated links to https where they are supported. 2016-01-13 13:26:10 -05:00
xhtml.php Added a way to run the test suite as an XHTML page. 2009-01-19 18:14:51 +00:00