Git Product home page Git Product logo

Comments (6)

dasmurphy avatar dasmurphy commented on June 8, 2024

Yes, this is currently a known issue. It's working on my iPad here, so i'm wondering what the problem might be.

Please try to change DEBUG_USER in fever_api.php with your user id from the users table you would like to test and post if it works then. After that change it back to 0, since setting DEBUG_USER disables the authentication.

It seems that the iPad does not safe/get the cookie the PHP script sets.

from tinytinyrss-fever-plugin.

dasmurphy avatar dasmurphy commented on June 8, 2024

Please look also in the TinyTinyRSS forum for more informations...

http://tt-rss.org/forum/viewtopic.php?f=22&t=1981

from tinytinyrss-fever-plugin.

wjchen avatar wjchen commented on June 8, 2024

I have the same problem
In fever_api.php line 735,I add the code:

file_put_contents(self::DEBUG_FILE,'ss: '.json_encode($_SESSION)."\n",FILE_APPEND);

The log is

parameter: {"manage":"statuses","mark":"item","as":"read","id":"15887","13724666
74766":""}
ss: null
parameter: {"api":"","links":"","range":"1","offset":"0","page":"1","api_key":"D
******"}
ss: {"uid":"1"}
answer   : {"api_version":3,"auth":1,"last_refreshed_on_time":"1372466610","link
s":[]}
parameter: {"manage":"statuses","mark":"item","as":"read","id":"15887","13724667
14849":""}
ss: null
parameter: {"manage":"statuses","mark":"item","as":"read","id":"15887","13724667
16966":""}
ss: null
parameter: {"manage":"statuses","mark":"item","as":"read","id":"15887","13724667
18800":""}
ss: null

The $_SESSION is null when mark a item as read...

Add a new line

file_put_contents(self::DEBUG_FILE,'cookie: '.json_encode($_COOKIE)."\n",FILE_APPEND);

The log is

parameter: {"manage":"statuses","mark":"item","as":"read","id":"15944","13724689
70939":""}
ss: null
cookie: {"fever_auth":"*********"}
answer   : {"api_version":3,"auth":0}
parameter: {"api":"","groups":"","api_key":"****************"}
ss: {"uid":"1"}
cookie: []

SO the api method has $_SESSION no $_COOKIE,but the manage method has $_COOKIE no $_SESSION.

from tinytinyrss-fever-plugin.

wjchen avatar wjchen commented on June 8, 2024

I think I fix the problem.
$_REQUEST on newer PHP setups contains only $_GET and $_POST.

--- a/fever/fever_api.php
+++ b/fever/fever_api.php
@@ -120,6 +120,10 @@ class FeverAPI extends Handler {
        private function setUser()
        {
                $apikey = isset($_REQUEST["api_key"])?$_REQUEST["api_key"]:'';
+                if($apikey == '')
+                    $apikey = isset($_COOKIE["fever_auth"])?$_COOKIE["fever_auth"]:'';
+
                // here comes Mr.Reader special API for logging in
                if ((strlen($apikey)==0)&&
                        (isset($_REQUEST["action"]))&&

from tinytinyrss-fever-plugin.

fearlesschicken avatar fearlesschicken commented on June 8, 2024

Just applied this patch and it works!

Thanks wjchen 👍

from tinytinyrss-fever-plugin.

akrabat avatar akrabat commented on June 8, 2024

I've created a PR for this: #3

Even though I fixed it slightly differently, @wjchen is correct in that request_order in php.ini is now recommended to be GP and so $_REQUEST doesn't include cookie information on a lot of installations.

from tinytinyrss-fever-plugin.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.