After an upgrade from 1.23.x to 1.25.1 I get an 'mustposttoken' error when I try to edit a page via API:
"code":"mustposttoken","info":"The 'token' parameter was found in the query string, but must be in the POST body"
When I remove the token parameter from the query parameters and add the token parameter to the post body, I get
"code":"notoken","info":"The token parameter must be set"
Any ideas?
/Planetenxin
On Mon, Jun 15, 2015 at 12:54 PM, planetenxin planetenxin@web.de wrote:
When I remove the token parameter from the query parameters and add the token parameter to the post body, I get
"code":"notoken","info":"The token parameter must be set"
Any ideas?
Sanity checks: You're actually doing a POST, not a GET with a body? Your Content-Type and Content-Length headers on the POST are correct?
After checking that, it would be helpful if you could capture the whole request being POSTed for further review. Obfuscate cookies and tokens, of course.
That's what I get when sniffing using Fiddler:
POST http://localhost:8080/wiki01/api.php?action=edit&title=Organization%3ALo... HTTP/1.1 Cookie: wikidb01_session=**********; path=/; domain=http://localhost:8080/wiki01/api.php; HttpOnly User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Content-Type: application/x-www-form-urlencoded Host: localhost:8080 Connection: Keep-Alive Content-Length: 52
Token=**********%2B%5C
Some characters in cookies and tokens has been obfuscated
Am 15.06.2015 um 21:24 schrieb Brad Jorsch (Anomie):
Sanity checks: You're actually doing a POST, not a GET with a body? Your Content-Type and Content-Length headers on the POST are correct?
After checking that, it would be helpful if you could capture the whole request being POSTed for further review. Obfuscate cookies and tokens, of course.
On Mon, Jun 15, 2015 at 4:28 PM, planetenxin planetenxin@web.de wrote:
Token=**********%2B%5C
Try it with a lowercase t.
wikitech-l@lists.wikimedia.org