X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiCheckToken.php;h=480915e60cf880a613c46073ba78391259e44485;hb=4d38a489b075fbd0a4c9ec228f83295cf9b9c5fc;hp=dd88b5fe3a5e2800254934f8c2bc5f1a0735d66c;hpb=3315354fd39f9bd60351ca27c73bafa05d449308;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiCheckToken.php b/includes/api/ApiCheckToken.php index dd88b5fe3a..480915e60c 100644 --- a/includes/api/ApiCheckToken.php +++ b/includes/api/ApiCheckToken.php @@ -43,9 +43,7 @@ class ApiCheckToken extends ApiBase { ); if ( substr( $token, -strlen( urldecode( Token::SUFFIX ) ) ) === urldecode( Token::SUFFIX ) ) { - $this->setWarning( - "Check that symbols such as \"+\" in the token are properly percent-encoded in the URL." - ); + $this->addWarning( 'apiwarn-checktoken-percentencoding' ); } if ( $tokenObj->match( $token, $maxage ) ) { @@ -75,6 +73,7 @@ class ApiCheckToken extends ApiBase { 'token' => [ ApiBase::PARAM_TYPE => 'string', ApiBase::PARAM_REQUIRED => true, + ApiBase::PARAM_SENSITIVE => true, ], 'maxtokenage' => [ ApiBase::PARAM_TYPE => 'integer',