[go: up one dir, main page]

Page MenuHomePhabricator

ApiUsageException: The authorization headers in your request are not valid: Invalid signature
Open, MediumPublicPRODUCTION ERROR

Description

Error
labels.normalized_message
[{reqId}] {exception_url}   ApiUsageException: The authorization headers in your request are not valid: Invalid signature
error.stack_trace
from /srv/mediawiki/php-1.43.0-wmf.9/includes/api/ApiUsageException.php(73)
#0 /srv/mediawiki/php-1.43.0-wmf.9/includes/session/SessionProvider.php(742): ApiUsageException::newWithMessage(NULL, MediaWiki\Message\Message)
#1 /srv/mediawiki/php-1.43.0-wmf.9/includes/HookContainer/HookContainer.php(159): MediaWiki\Session\SessionProvider::MediaWiki\Session\{closure}(ApiMain)
#2 /srv/mediawiki/php-1.43.0-wmf.9/includes/HookContainer/HookRunner.php(692): MediaWiki\HookContainer\HookContainer->run(string, array)
#3 /srv/mediawiki/php-1.43.0-wmf.9/includes/api/ApiEntryPoint.php(144): MediaWiki\HookContainer\HookRunner->onApiBeforeMain(ApiMain)
#4 /srv/mediawiki/php-1.43.0-wmf.9/includes/MediaWikiEntryPoint.php(200): MediaWiki\Api\ApiEntryPoint->execute()
#5 /srv/mediawiki/php-1.43.0-wmf.9/api.php(44): MediaWiki\MediaWikiEntryPoint->run()
#6 /srv/mediawiki/w/api.php(3): require(string)
#7 {main}
Impact
Notes

Noticed a handful of these during log triage. Seems like something that shouldn't be hitting error logs.

Details

Request URL
https://mg.wiktionary.org/w/api.php

Event Timeline

Tgr subscribed.

This is user error (invalid OAuth signature). The problem on our side is that it ends up in the exception channel which should not happen for an ApiUsageException. It should be handled by ApiMain::handleApiBeforeMainException() which AFAICS does not log there (unfortunately since the stack trace reflects where the exception was created, not where it was logged, it's hard to be sure what's going on).