(bug 35727) mw.Api ajax() should put token parameter last.
authorBrad Jorsch <anomie.wikipedia@gmail.com>
Sun, 17 Jun 2012 04:11:32 +0000 (00:11 -0400)
committerTimo Tijhof <ttijhof@wikimedia.org>
Tue, 19 Jun 2012 20:42:48 +0000 (22:42 +0200)
commit39f09f3664e4393cb04a502780451df9f89541a8
tree8181055f16ffeb77428bde6adc0dab6c71b27aac
parentc9d37c9a8fb94c498f4bf8afd41ea1f54dc8b324
(bug 35727) mw.Api ajax() should put token parameter last.

Patch from Russell Blau.

As recommended in [[mw:API:Edit#Token]], the "token" parameter in
a request should always be passed at the end of the query string.
This is a safety measure in case transmission of the HTML request to
the server is interrupted; then the server will not process the
incomplete request because there will be no (complete) token.
(Conversely, if the "text=" parameter were last, the server would have
no way of knowing whether the complete text had been received.)
Presumably the same thing is necessary for action=email, since the
request may include text of arbitrary length.

Change-Id: Id267dd628eb93eb06191c55eb386b1893f499554
CREDITS
RELEASE-NOTES-1.20
resources/mediawiki.api/mediawiki.api.js