jquery/test/unit
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
..
ajax.js Ajax: Drop the json to jsonp auto-promotion logic 2020-07-27 19:15:57 +02:00
animation.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
attributes.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
basic.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
callbacks.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
core.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
css.js CSS: Include show, hide & toggle methods in the jQuery slim build 2020-05-05 14:16:41 +02:00
data.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
deferred.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
deprecated.js Deprecated: Remove jQuery.trim 2020-05-18 23:20:38 +02:00
dimensions.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
effects.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
event.js Tests: Use only one focusin/out handler per matching window & document 2020-04-27 21:37:06 +02:00
exports.js Build: Update test code for compatibility with QUnit 2.x (#4297) 2019-02-18 19:03:26 +01:00
manipulation.js Manipulation: Avoid concatenating strings in buildFragment 2020-06-10 16:13:22 +02:00
offset.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
queue.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
ready.js Tests: Pass a number of necessary done() calls to assert.async() 2020-03-02 22:15:06 +01:00
selector.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
serialize.js Build:Tests: Fix custom build tests, verify on Travis 2020-01-07 23:59:08 +01:00
support.js CSS: Workaround buggy getComputedStyle on table rows in IE/Edge 2019-10-14 18:41:35 +02:00
traversing.js Manipulation: Make jQuery.htmlPrefilter an identity function 2020-03-16 21:49:29 +01:00
tween.js Build: Update Sinon from 2.3.7 to 7.3.1, other updates 2019-04-04 16:53:38 +02:00
wrap.js Tests: Remove remaining obsolete jQuery.cache references 2020-05-18 18:43:01 +02:00