X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frequesttoken.php;h=5058deedb5a55b23c2a9ce990a7129bc4704a316;hb=6edbf3ca781d20f2ec98daf32080c60e804d8215;hp=4a23215323fd767a28f412e106e575807470e637;hpb=7d6e1bb47f823eee410126c314981ef042a27bd8;p=quix0rs-gnu-social.git diff --git a/actions/requesttoken.php b/actions/requesttoken.php index 4a23215323..5058deedb5 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -21,21 +21,25 @@ if (!defined('LACONICA')) { exit(1); } require_once(INSTALLDIR.'/lib/omb.php'); -class RequesttokenAction extends Action { - - function is_readonly() { - return false; - } - - function handle($args) { - parent::handle($args); - try { - $req = OAuthRequest::from_request(); - $server = omb_oauth_server(); - $token = $server->fetch_request_token($req); - print $token; - } catch (OAuthException $e) { - common_server_error($e->getMessage()); - } - } +class RequesttokenAction extends Action +{ + + function isReadOnly() + { + return false; + } + + function handle($args) + { + parent::handle($args); + try { + common_remove_magic_from_request(); + $req = OAuthRequest::from_request(); + $server = omb_oauth_server(); + $token = $server->fetch_request_token($req); + print $token; + } catch (OAuthException $e) { + $this->serverError($e->getMessage()); + } + } }