andresth / Kandroid

Android App for http://kanboard.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Login not possible - password not correct

natrius opened this issue · comments

Actual behaviour

Open the app, insert URL and the credentials to my kanboard on my webspace "Password incorrect". (User created manually via admin).

(With the last version there was all the time "You are using a version prior to 1.0.38" - but since the update that does not happen anymore)

Expected behaviour

Login successful

Steps to reproduce

1, Create user on KanBoard Admin
2, download app from f-droid store
3, insert credentials

Configuration

Application version: 1.0.42
PHP version: 7.0.15
PHP SAPI: cgi-fcgi
OS version: Linux 3.14.79-grsec-hosting-web-3.14
Database driver: sqlite
Database version: 3.14.2
Browser: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0

Android app

Downloaded via F-Droid (Kandroid)
Version: 0.5.4

Questions

Do i need something special with the user? I tried "remote" and "local" (i suppose its not meant for that as it states "for third-party-authentication").
I could not find any instructions where is stated that i need to do something special.
If the app is not from your side, sorry for this issue. Could not find something else.
Password is longer than 4 characters, it does not work with admin and with the created user.

I am in the same configuration
I tested with Kandroid 0.5.4 (f-droid) et Kandroid 0.5.5 (download apk from github).

I face the "Password incorrect" message in both cases.
I can login to my Kanboard account from Firefox without any difficulties.

For people using framaboard.org instance, problem probably comes from the server configuration. I don't think it's your case @natrius but the problem might be related.

I tried Kandroid on a personal instance of Kanboard (same app configuration as Framaboard) and it was working. I logged credentials in app/Api/Middleware/AuthenticationMiddleware.php but they seem to be empty so I guess they are not retrieved correctly by the server.

We are speaking of the Framaboard problem on https://framacolibri.org/t/impossibilite-dutiliser-kandroid-avec-framaboard/1732 if you are interested (in French, sorry) but I'll let you know if we find something :)

Hi there! Problem seems to come from the configuration of Apache with PHP CGI/FastCGI. Kanboard uses HTTP basic access authentication for the API, but the credentials which should be present in $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] are not set. According to the first comment of http://php.net/manual/bg/features.http-auth.php, you should add the following line to your .htaccess or Apache config to make it works:

SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

In my case, I am not hosted by framaboard but in shared hosting (yulpa.io), however the proposed modification of the .htaccess solved my login problem !

Thanks Framasoft friends :-)

i m facing the error with php 7... [cpanel easyapache 4]

updated the htaccess with setenvif yet the same error... any idea?

No idea but you should try to log $_SERVER['PHP_AUTH_USER'] variable somewhere such as index.php and see if variable is set

Its not updated yet. Thanks for the help and the fix!

If someone is searching: Open the .htaccess file and add the top 7 lines from there kanboard/kanboard#3456 (just change to files and you will find it).
But i'm sure, it will be added soon.

Seems like the problem is solved :)