Last modified: 2014-08-26 19:39:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40715, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38715 - Requesting tokens when not authenticated
Requesting tokens when not authenticated
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-26 17:20 UTC by Jon
Modified: 2014-08-26 19:39 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2012-07-26 17:20:22 UTC
When requesting a token via action=tokens when not logged in

I get the response 
{
	"warnings": {
		"tokens": {
			"*": "Action 'import' is not allowed for the current user"
		}
	},
	"tokens": [
		
	]
}

To be consistent with the rest of the api, this should return a json object with an error key so that it is clear that this is an error.
Comment 1 Addshore 2014-02-24 19:15:37 UTC
I guess the issue here is that if you request multiple tokens, 1 edit and 1 import you don't want the whole request to fail if your not allowed to import as you still want the edit token.
Comment 2 Kunal Mehta (Legoktm) 2014-08-26 19:39:05 UTC
What Addshore said.

{
    "warnings": {
        "tokens": {
            "*": "Action 'delete' is not allowed for the current user"
        }
    },
    "tokens": {
        "edittoken": "+\\"
    }
}

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links