Alkarex / EasyRSS

Android client for RSS services compatible with Google Reader API
http://freshrss.org
GNU General Public License v3.0
123 stars 13 forks source link

Login not workin with new version #62

Closed kaktux closed 4 years ago

kaktux commented 4 years ago

hi there,

i am using a Jolla Phone (sailfish) - with android emulated via alien dalvik. For about 3? or so years i used easy rss with my own fresh rss install.

Recently i had to factory reset my phone - and after reinstalling the current version of easy rss via fdroid i can not log in anymore.

I tried several times - and alyways it returns "now logging... -> Login failed, please check your username and password."

The data must be right - as i used shared clipboard via kde connect and simply pasted the save data from my browser (where login works).

Alkarex commented 4 years ago

Hello, First, make sure you have the latest EasyRSS version https://f-droid.org/packages/org.freshrss.easyrss/ , i.e. 0.7.6. Then, if you can, please try with the current master branch of FreshRSS (1.16.1-dev).

kaktux commented 4 years ago

Easy Rss is the newest version - 0.7.6. installed via fdroid 2 days ago. FreshRSS i just updated to 1.16 via admin + update function. Couldnt find a 1.16.1-dev.

The update of FreshRSS didnt change it - still the same message as above.

Login url i use is : https://news.mydomain.com/api/greader.php

Alkarex commented 4 years ago

Please check your logs in ./FreshRSS/data/users/_/log_api.txt and your Web server logs.

Try from your Web browser to browse to https://freshrss.example.net/api/ to check the automatic tests.

If you can, then try the first two curl queries from https://freshrss.github.io/FreshRSS/en/users/06_Mobile_access.html#google-reader-compatible-api

Alkarex commented 4 years ago

Ah, right, 1.16.0 and not 1.16.1-dev. You can update to the latest rolling version by using git, or Docker, or the latest ZIP archive https://github.com/FreshRSS/FreshRSS/archive/master.zip

Otherwise, please apply this patch manually https://github.com/FreshRSS/FreshRSS/pull/2961/files

kaktux commented 4 years ago
  1. ./FreshRSS/data/users/_/log_api.txt (entries from today)
[Wed, 20 May 2020 06:37:07 +0000] [warning] --- unauthorized() Array
(
    [date] => 2020-05-20T06:37:07+00:00
    [headers] => Array
        (
            [Accept-Encoding] => gzip
            [Connection] => Keep-Alive
            [Host] => news.mydomain.com
            [User-Agent] => Dalvik/1.6.0 (Linux; U; Android 4.1.2; Jolla Build/JZO54K)
            [Authorization] => 
        )

    [_SERVER] => Array
        (
            [USER] => mydomainde
            [HOME] => /var/www/vhosts/mydomain.com
            [PATH_TRANSLATED] => /var/www/vhosts/mydomain.com/news.mydomain.com/accounts/ClientLogin
            [PATH_INFO] => /accounts/ClientLogin
            [SCRIPT_NAME] => /p/api/greader.php
            [REQUEST_URI] => /p/api/greader.php/accounts/ClientLogin
            [QUERY_STRING] => 
            [REQUEST_METHOD] => POST
            [SERVER_PROTOCOL] => HTTP/1.1
            [GATEWAY_INTERFACE] => CGI/1.1
            [REMOTE_PORT] => 44747
            [SCRIPT_FILENAME] => /var/www/vhosts/mydomain.com/news.mydomain.com/p/api/greader.php
            [SERVER_ADMIN] => root@localhost
            [CONTEXT_DOCUMENT_ROOT] => /var/www/vhosts/mydomain.com/news.mydomain.com
            [CONTEXT_PREFIX] => 
            [REQUEST_SCHEME] => https
            [DOCUMENT_ROOT] => /var/www/vhosts/mydomain.com/news.mydomain.com
            [REMOTE_ADDR] => 87.122.xxx.xxx
            [SERVER_PORT] => 443
            [SERVER_ADDR] => 176.9.xxx.xxx
            [SERVER_NAME] => news.mydomain.com
            [SERVER_SOFTWARE] => Apache
            [SERVER_SIGNATURE] => 
            [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
            [CONTENT_LENGTH] => 100
            [HTTP_ACCEPT_ENCODING] => gzip
            [HTTP_CONNECTION] => Keep-Alive
            [HTTP_HOST] => news.mydomain.com
            [HTTP_USER_AGENT] => Dalvik/1.6.0 (Linux; U; Android 4.1.2; Jolla Build/JZO54K)
            [CONTENT_TYPE] => application/x-www-form-urlencoded
            [proxy-nokeepalive] => 1
            [SSL_TLS_SNI] => news.mydomain.com
            [HTTPS] => on
            [modHeadersAvailable] => true
            [PERL5LIB] => /usr/share/awstats/lib:/usr/share/awstats/plugins
            [HTTP_AUTHORIZATION] => 
            [UNIQUE_ID] => XsTQEyciqkMIVkVvnxlrQgAAANg
            [FCGI_ROLE] => RESPONDER
            [PHP_SELF] => /p/api/greader.php/accounts/ClientLogin
            [REQUEST_TIME_FLOAT] => 1589956627.219
            [REQUEST_TIME] => 1589956627
        )

    [_GET] => Array
        (
        )

    [_POST] => Array
        (
            [Email] => myname
            [Passwd] => mypasswd
            [accountType] => GOOGLE
            [service] => reader
            [source] => Sun-EasyRSS
        )

    [_COOKIE] => Array
        (
        )

    [INPUT] => Email=myname&Passwd=mypasswd&accountType=GOOGLE&service=reader&source=Sun-EasyRSS
)
  1. https://news.mydomain.com/api/

gives a redirect error and changes to https://news.mydomain.com/api/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/p/

  1. curl - i only have a basic hoster currently. So no termainal access.

  2. i copied the linked maszer zip over my installation via ftp.

Still the same behaviour when trying to access via easy rss.

Alkarex commented 4 years ago
  1. It looks mostly good. Maybe you could try to set your API password again in FreshRSS. Please have a look for error messages in ./FreshRSS/data/users/_/log.php and ./FreshRSS/data/users/your-name/log.php to get more details

  2. Hum, the infinite redirect is a sign of another mis-configuration. Please check your base_url in ./FreshRSS/data/config.php, but that cannot explain the problem. Have you added yourself some kind of automatic redirect somewhere?

  3. You can run the curl commands from any other computer

  4. Good

If you like, you can make me a temporary FreshRSS account so I can give it a try.

kaktux commented 4 years ago
  1. data/users/_/log.txt (no .php there) says:

[Wed, 20 May 2020 06:37:07 +0000] [warning] --- Password API mismatch for user username

data/username log.txt looks fine (besides a currently non-working feed no error messages).

I did renew the api password. Also the link under the password is: https://news.mydomain.com/p/api/ and shows pass for greader and fever.

  1. 'base_url' => 'https://news.mydomain.com/p',

  2. curl 'https://my.domain.com/api/greader.php/accounts/ClientLogin?Email=alice&Passwd=Abcdef123456'

    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB" lang="en-GB">
    <head>
    <meta charset="UTF-8" />
    <meta http-equiv="Refresh" content="0; url=p/" />
    <title>Redirection</title>
    <meta name="robots" content="noindex" />
    </head>

FreshRSS


curl -s -H "Authorization:GoogleLogin auth=alice/8e6845e089457af25303abc6f53356eb60bdb5f8" \
  'https://my.domain.com/api/greader.php/reader/api/0/subscription/list?output=json'

<!DOCTYPE html>

Redirection

FreshRSS



sure - i dont mind giving you an account. nothing to hide there. just a (great) news reader :D
Alkarex commented 4 years ago

Hello, I see. It works if you use https://freshrss.example.net/p/api/greader.php

curl -v 'https://freshrss.example.net/p/api/greader.php/accounts/ClientLogin?Email=freshrss&Passwd=freshrss'

curl -v -s -H "Authorization:GoogleLogin auth=freshrss/8XXXXXXXXX5" 'https://freshrss.example.net/p/api/greader.php/reader/api/0/subscription/list?output=json'

However, this is not good. You are not supposed to expose the /p/ in the URL.

Consider fixing your DocumentRoot https://freshrss.github.io/FreshRSS/en/admins/10_ServerConfig.html

After that, adjust your base_url in ./FreshRSS/data/config.php

kaktux commented 4 years ago

thx a bunch. That works for now. I will try to ask my hoster about the changes.

I also edited out my domainname from my post so no one tries my installation :package:

thx again for the help and the awesome software

kaktux commented 4 years ago

would you mind editing out my url and account data ;) thx

Alkarex commented 4 years ago

Done :-)