diff options
| author | 2015-01-14 21:13:38 +0100 | |
|---|---|---|
| committer | 2015-01-14 21:13:38 +0100 | |
| commit | f1ffdd8b9d1f3d8742f1328dfa805664a66e34aa (patch) | |
| tree | 43c1f8a00271a542e59838aed7e109abc01a0524 | |
| parent | e8556ac1a4c00b4e44e88a7d73feca6f7462fc34 (diff) | |
Fix stupid bug in greader API
Replace Minz_Session::_param() by Minz_Session::param() in token()
and checkToken() functions.
Fix https://github.com/FreshRSS/FreshRSS/issues/747
| -rw-r--r-- | p/api/greader.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 20f72cc3b..ab1a02244 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -204,7 +204,7 @@ function clientLogin($email, $pass) { //http://web.archive.org/web/2013060409104 function token($conf) { //http://blog.martindoms.com/2009/08/15/using-the-google-reader-api-part-1/ //https://github.com/ericmann/gReader-Library/blob/master/greader.class.php - $user = Minz_Session::_param('currentUser', '_'); + $user = Minz_Session::param('currentUser', '_'); logMe('token('. $user . ")\n"); //TODO: Implement real token that expires $system_conf = Minz_Configuration::get('system'); $token = str_pad(sha1($system_conf->salt . $user . $conf->apiPasswordHash), 57, 'Z'); //Must have 57 characters @@ -214,7 +214,7 @@ function token($conf) { function checkToken($conf, $token) { //http://code.google.com/p/google-reader-api/wiki/ActionToken - $user = Minz_Session::_param('currentUser', '_'); + $user = Minz_Session::param('currentUser', '_'); logMe('checkToken(' . $token . ")\n"); $system_conf = Minz_Configuration::get('system'); if ($token === str_pad(sha1($system_conf->salt . $user . $conf->apiPasswordHash), 57, 'Z')) { @@ -649,7 +649,7 @@ elseif ($pathInfos[1] === 'reader' && $pathInfos[2] === 'api' && isset($pathInfo markAllAsRead($streamId, $ts); break; case 'token': - Token($conf); + token($conf); break; } } elseif ($pathInfos[1] === 'check' && $pathInfos[2] === 'compatibility') { |
