Page MenuHomePhabricator

Nonce already used OAuth errors
Closed, ResolvedPublic


I've seen them very rarely before, but today ~1 out of 50 requests results in a mediawiki API error:

Exception("{u\'info\': u\'The authorization headers in your request are not valid: Nonce already used: 145531318178372694281437064392\', u\'*\': u\'See for API usage\', u\'code\': u\'mwoauth-invalid-authorization\'}",)

crosswatch should catch these and try again.

Event Timeline

Sitic claimed this task.
Sitic raised the priority of this task from to High.
Sitic updated the task description. (Show Details)
Sitic added a project: crosswatch.
Sitic moved this task to In Progress on the crosswatch board.
Sitic added a subscriber: Sitic.

The nonce is generated by :

return unicode_type(unicode_type(random.getrandbits(64)) + generate_timestamp())

Change 225258 had a related patch set uploaded (by Sitic):
Forward API errors to client, fix error handling

Change 225258 merged by Sitic:
Forward API errors to client, fix error handling

Was caused by nutcracker and a misleading error message, see T106066.