XZise added a comment.
We need to determine how the tokens are used. I can only check on one third
party wiki using 1.24.2 but it supports tokens via `query+revisions` as well as
`query+tokens`. And the latter one is independent of the revision while the
former seems to depend on the author of the revision. What this means is when
`query+tokens` is available and this token is used the badtoken recovery should
work as it finds the token in the cache and just rerequests it with that.
But if `query+tokens` is not available it's hard to get the `rollback` token
while doing the badtoken recovery. We could just check if it's rolling back a
revision and then (if the token was not found in the cache) just rerequest the
rollback token. But that obviously doesn't work if some extension is using the
rollback token as we can't parse the request to determine what is the revision
id to rerequest token.
This is the result for `query+tokens`:
{
"query": {
"tokens": {
"rollbacktoken": "9db27b7976cd23d784b41ecfaeab17b1+\\"
}
}
}
Interestingly the token via `query+tokens` is different than the token I'd get
for myself in `query+revisions`:
{
[…]
"query": {
"pages": {
"1": {
"pageid": 1,
"ns": 0,
"title": "Main Page",
"revisions": [
{
"user": "XZise",
"rollbacktoken": "ebae22cc6e6004edb653f8cdd6ef8243+\\"
},
{
"user": "N3X15",
"rollbacktoken": "bfd2cebe83323addbabac4b8d30b8a96+\\"
},
[… multiple revisions by N3X15 all using the same token
…],
{
"user": "UmbralRaptor",
"rollbacktoken": "f81610a7173966472ad302116d5fb67f+\\"
}
]
}
}
}
}
The token I got for myself on another page is also different:
{
"query-continue": {
"revisions": {
"rvcontinue": 58937
}
},
"warnings": {
"revisions": {
"*": "The rvtoken parameter has been deprecated."
}
},
"query": {
"pages": {
"14": {
"pageid": 14,
"ns": 0,
"title": "Parts",
"revisions": [
{
"user": "BobBot",
"rollbacktoken": "fe222f2abfae806554a7d2f9ea257676+\\"
},
{
"user": "Starhawk",
"rollbacktoken": "58b4dc148c6638027ee0e441bc9a9800+\\"
},
[… multiple revisions by Starhawk using the same token …]
{
"user": "XZise",
"rollbacktoken": "8da3aa589d3aff54a0de03b097b5f81e+\\"
},
[… multiple revisions by Starhawk also using the previous
token …]
]
}
}
}
}
TASK DETAIL
https://phabricator.wikimedia.org/T102734
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise
Cc: XZise, Aklapper, jayvdb, pywikibot-bugs-list
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs