When you click on the example links in the api you would automatically merge the Items in Wikidata. You don't need a edit token or anything. We probably don't want that.
Description
Details
Related Objects
Event Timeline
Fix:
Add the following to MergeItems.php
public function needsToken() {
return true;
}tried the patch locally, doing a get request with token parameter and get "The 'token' parameter was found in the query string, but must be in the POST body"
thus, I think the patch is good and sufficient.
thanks legoktm!
Applies cleanly to both 1.25wmf19 and 1.25wmf22 of Wikidata (the deployed branches).
Patch applied, verified and deployed. I will close/ publish this bug once we fix this on master.
Change 198736 had a related patch set uploaded (by Hoo man):
Make the merge item API require an edit token
@Magnus: I think your tools are fine but just in case you run into trouble...
@Ladsgroup, @Multichill, @Sjoerddebruin: for your info as well in case you see any bot user having issues
Looks like Pywikibot already uses a token and posts it, see https://git.wikimedia.org/blob/pywikibot%2Fcore.git/3c097590364c81d35502ab99baaa742493db70c6/pywikibot%2Fsite.py#L5821
As far as I could tell, the merge gadget and Magnus' tools all do the right thing and use post + token, which means they shouldn't be affected by this change.
Change 198747 had a related patch set uploaded (by Hoo man):
Make the merge item API require an edit token