flionet89 / Nextcloud-roundcube

NextCloud app to integrate RoundCube Webmail
GNU Affero General Public License v3.0
10 stars 7 forks source link

No auto-login #19

Open manuelkamp opened 2 years ago

manuelkamp commented 2 years ago

The feature "Auto login" does not work. Is there any special setting or plugin needed for roundcube? (nc and mail user have the same password, so it should work?)

{"reqId":"YdEMx9E0vG2z8SPJtT7jKQAARAI","level":3,"time":"2022-01-02T02:24:07+00:00","remoteAddr":"10.0.0.1","user":"manuel","app":"PHP","method":"GET","url":"/apps/roundcube/","message":"Undefined index: set-cookie at /var/www/nextcloud/apps/roundcube/lib/BackLogin.php#110","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62","version":"23.0.0.10","exception":{"Exception":"Error","Message":"Undefined index: set-cookie at /var/www/nextcloud/apps/roundcube/lib/BackLogin.php#110","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/roundcube/lib/BackLogin.php","line":110,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/roundcube/lib/Auth/AuthHelper.php","line":99,"function":"login","class":"OCA\\RoundCube\\BackLogin","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/roundcube/lib/Controller/PageController.php","line":85,"function":"login","class":"OCA\\RoundCube\\Auth\\AuthHelper","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\RoundCube\\Controller\\PageController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

Igortorrente commented 2 years ago

If you are using the release version see this bug https://github.com/flionet89/Nextcloud-roundcube/issues/9.

manuelkamp commented 2 years ago

thank you, I replaced all files from your repo, but I still do not get autologin to work. Is there any special setting needed? I get a bunch of errors when clicking on Email in the Cloud menu. Pls let me know if you need any details fron any error entry. Screenshot 2022-01-13 122314

Every cloud username is exactly the same as the mail username without domain part. Every cloud user has its E-Mail adress stored in the cloud profile. The passwords of cloud user and mail user is the same (for the test account). currently there is no common password connection between both, but that is not the issue here.

Igortorrente commented 2 years ago

Yes, this app need some special settings. You need to setup de reverse proxy in the nextcloud web server configuration and the Default RC installation path(And this requires the reverse proxy). If you use Nginx I can help with that.

It's hard do debug without knowing your setup, but the parsing of the html is returning, what I presume to be, a empty array. What version of the roundcube are you using? Maybe the newer version(>= 1.5) broke the parser, I don't know.

It is strange because another person could run this app fine in the NC23

manuelkamp commented 2 years ago

I have the roundcube app 1.5.2 in the cloud itself working flawless without any errors (apache reverse proxy configured and working). I even installed all the plugins I have running on the current production version, which is not included in the cloud (running on the mail server). The only thing I do not get to work is the autologin feature of this cloud plugin - which is the feature I most needed/wanted, otherwise there is no benefit for me to dump the current working production roundcube on the mailserver, which is completely separated from the cloud (usable with external link in cloud).

I do not get any error on the UI - there is just this loading screen, fading out and showing the login screen of roundcube. manually entering user credentials works - but I have that already with a roundcube installation on my mailserver. I'd love to hear anybode have autologin working or any ideas how to get it working :)

My setup is pretty straight forward - nothing special I believe. Debian 11 64 bit, Nextcloud running on apache2 with PHP FPM 7.4 (no docker). MariaDB, Redis-Server, Turnserver for cloud services running. Data stored on btrfs disk raid. SMB for access for the backup machine is configred and running. Nothing else is running on the machine (but a bunch of additional cloud apps, like talk, maps, news...)

Igortorrente commented 2 years ago

I was exactly in the same situation 6 months ago, so I'm really understand you situation.

From what you told me, your setup looks to be fine. My suspect right now is the roundcube app version. Maybe they introduce something in this new version that breaks the parser.

I was using the roundcube 1.4.12 when I was working in this app. Unfortunately I don't have the setup to debug this issue right now :(

My suggestion, if possible, try the version 1.4.12 on your test environment.

manuelkamp commented 2 years ago

thank you for your help - but I decided to not go this extra mile, just because I for sure do not want to use 1.4.12 in production since it is too old and already security issues are found on it (https://www.cvedetails.com/cve/CVE-2021-46144/). Maybe I will check the status of this project again in the future, but for now I will not continue work on it because there is no advantage (since autologin does not work) including it as app in NC for now.

I also looked into OAuth (roundcube against NC), but this did not work too - roundcube just states there was an oauth error, but no info in logs (neither rc nor nc)...

Igortorrente commented 2 years ago

Understandable.

I will work back into this app in the future and I update this issue if I find a fix for it.

manuelkamp commented 2 years ago

is there any improvement on the autologin situation, or can this plugin considered as deprecated? anyone knows?

kimcdow commented 2 years ago

@manuelkamp I would consider this app deprecated as it has not been updated in the last 10 months (probably only needs a version bump) to work with NC 23 Stable or NC 24, nor does it appear to have been touched for any of the eight issues in queue. Another issue that maybe posing a problem is the developer is Russian and may be blocked.