Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using action=tokens API function. #120

Open
Pchelolo opened this issue Apr 21, 2021 · 4 comments · May be fixed by #124
Open

Stop using action=tokens API function. #120

Pchelolo opened this issue Apr 21, 2021 · 4 comments · May be fixed by #124

Comments

@Pchelolo
Copy link

MediaWiki Core team is going to remove the deprecated action=tokens API from core, thus also removing it from Wikimedia cluster. The API has been deprecated since 2014 and now it's blocking some major refactoring we are trying to make. Currently this library accounts for 78% of requests to the deprecated API, could you please update it use the meta=tokens replacement?

@DannyS712
Copy link

@Pchelolo (and @cyberpower678) this was noticed a while ago and I sent a pull request to fix it last year, but only within the Cyberbot_I repo - is it also an issue in this repo? See cyberpower678/Cyberbot_I#20

@Pchelolo
Copy link
Author

Judging by the api-feature-usage logs in prod, Cyberbot_I seems to be using this library. Plus, some other bots use this library account for 83% of requests to deprecated endpoint.

@reedy
Copy link

reedy commented Jul 30, 2021

It's not just action=tokens

action=query&list=users&ustoken seems to be used by numerous bots too -

'ustoken' => 'userrights'

reedy added a commit to reedy/Peachy that referenced this issue Jul 30, 2021
@reedy
Copy link

reedy commented Jul 30, 2021

Bots are seemingly doing queries for ALL OF THE TOKENS

/w/api.php?action=tokens&type=block%7Cdelete%7Cdeleteglobalaccount%7Cedit%7Cemail%7Cimport%7Cmove%7Coptions%7Cpatrol%7Cprotect%7Csetglobalaccountstatus%7Cunblock%7Cwatch

Peachy/Includes/Wiki.php

Lines 2315 to 2320 in 2cd3f93

$tokens = $this->apiQuery(
array(
'action' => 'tokens',
'type' => 'block|delete|deleteglobalaccount|edit|email|import|move|options|patrol|protect|setglobalaccountstatus|unblock|watch'
)
);

reedy added a commit to reedy/Peachy that referenced this issue Jul 30, 2021
@reedy reedy linked a pull request Jul 30, 2021 that will close this issue
reedy added a commit to reedy/Peachy that referenced this issue Jul 30, 2021
reedy added a commit to reedy/Peachy that referenced this issue Oct 12, 2021
reedy added a commit to reedy/Peachy that referenced this issue Oct 12, 2021
reedy added a commit to reedy/Peachy that referenced this issue Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants