X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiLogout.php;h=d549e75fe47078d263ab195046640891267bb9c5;hb=e900893531e76fb8f80c1c9b5be459fd02862c3c;hp=d56c096c7b365e5d530f297cd0bac07ecb66fc66;hpb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiLogout.php b/includes/api/ApiLogout.php index d56c096c7b..d549e75fe4 100644 --- a/includes/api/ApiLogout.php +++ b/includes/api/ApiLogout.php @@ -1,9 +1,5 @@ @gmail.com", * * This program is free software; you can redistribute it and/or modify @@ -63,13 +59,25 @@ class ApiLogout extends ApiBase { Hooks::run( 'UserLogoutComplete', [ &$user, &$injected_html, $oldName ] ); } + public function mustBePosted() { + return true; + } + + public function needsToken() { + return 'csrf'; + } + + protected function getWebUITokenSalt( array $params ) { + return 'logoutToken'; + } + public function isReadMode() { return false; } protected function getExamplesMessages() { return [ - 'action=logout' + 'action=logout&token=123ABC' => 'apihelp-logout-example-logout', ]; }