Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login to snappymail fails after system upgrade #632

Closed
alabre opened this issue Nov 6, 2022 · 8 comments
Closed

Login to snappymail fails after system upgrade #632

alabre opened this issue Nov 6, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@alabre
Copy link

alabre commented Nov 6, 2022

After an upgrade of my archlinux vps I cannot log into the snappymail app any longer.
I am wondering if you or some maintainer of the upgarded packages is the right person to address this issue and would like to hear your point of view.

Thank you for snappymail and the quick and great progress it makes! :-)

To Reproduce
Go to login page and try to log on.
You stay at the login page after every login try.

Expected behavior
I can log on to the snappymail client

Please complete the following information:

  • Browser: chromium 107
  • PHP version: 8.1.12
  • SnappyMail Version: 2.20.2
  • archlinux, kernel 6.0.7

Debug/logging information
The related messages in the nextcloud logs in order of appearence
[PHP] Fehler: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated at /.../apps/snappymail/app/snappymail/v/2.20.2/app/libraries/snappymail/crypt.php#58

POST /apps/snappymail/?/Json/&q[]=/0/


[PHP] Fehler: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated at /.../apps/snappymail/app/snappymail/v/2.20.2/app/libraries/snappymail/crypt.php#58

GET /apps/snappymail/?/Css/0/User/-/Nextcloud@custom/-/2a4ebb79391...e9cd311/Hash/-/Json/


[PHP] Fehler: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated at /.../apps/snappymail/app/snappymail/v/2.20.2/app/libraries/snappymail/crypt.php#58

POST /apps/snappymail/?/Json/&q[]=/0/


[PHP] Fehler: Undefined variable $sEmail at /.../data/appdata_snappymail/data/default/plugins/nextcloud/index.php#186

GET /apps/snappymail/?/AppData/0/196...34/

Additional context
since the last successful login and now the following packages were updated
[2022-11-06T09:45:39+0100] [ALPM] upgraded libxcrypt (4.4.28-2 -> 4.4.30-1)
[2022-11-06T09:45:40+0100] [ALPM] upgraded openssl (1.1.1.q-1 -> 3.0.7-2)
[2022-11-06T09:45:40+0100] [ALPM] upgraded libsasl (2.1.28-1 -> 2.1.28-3)
[2022-11-06T09:45:40+0100] [ALPM] upgraded libldap (2.6.3-1 -> 2.6.3-2)
[2022-11-06T09:45:40+0100] [ALPM] upgraded libevent (2.1.12-2 -> 2.1.12-4)
[2022-11-06T09:45:40+0100] [ALPM] upgraded krb5 (1.20-1 -> 1.20-3)
[2022-11-06T09:45:40+0100] [ALPM] upgraded coreutils (9.1-1 -> 9.1-3)
[2022-11-06T09:45:40+0100] [ALPM] upgraded systemd-libs (251.7-1 -> 251.7-4)
[2022-11-06T09:45:40+0100] [ALPM] upgraded apr-util (1.6.1-9 -> 1.6.1-10)
[2022-11-06T09:45:41+0100] [ALPM] upgraded apache (2.4.54-2 -> 2.4.54-3)
[2022-11-06T09:45:41+0100] [ALPM] upgraded cryptsetup (2.5.0-1 -> 2.5.0-3)
[2022-11-06T09:45:41+0100] [ALPM] upgraded libssh2 (1.10.0-1 -> 1.10.0-3)
[2022-11-06T09:45:41+0100] [ALPM] upgraded curl (7.86.0-1 -> 7.86.0-3)
[2022-11-06T09:45:41+0100] [ALPM] upgraded kmod (30-1 -> 30-3)
[2022-11-06T09:45:41+0100] [ALPM] upgraded lcms2 (2.13.1-1 -> 2.14-1)
[2022-11-06T09:45:41+0100] [ALPM] upgraded ldns (1.8.3-1 -> 1.8.3-2)
[2022-11-06T09:45:41+0100] [ALPM] upgraded libarchive (3.6.1-2 -> 3.6.1-5)
[2022-11-06T09:45:42+0100] [ALPM] upgraded systemd (251.7-1 -> 251.7-4)
[2022-11-06T09:45:42+0100] [ALPM] upgraded libpulse (16.1-1 -> 16.1-3)
[2022-11-06T09:45:42+0100] [ALPM] upgraded libssh (0.10.4-1 -> 0.10.4-3)
[2022-11-06T09:45:45+0100] [ALPM] upgraded linux (6.0.6.arch1-1 -> 6.0.7.arch1-1)
[2022-11-06T09:45:45+0100] [ALPM] upgraded openssh (9.1p1-1 -> 9.1p1-3)
[2022-11-06T09:45:45+0100] [ALPM] upgraded tpm2-tss (3.2.0-1 -> 3.2.0-3)
[2022-11-06T09:45:45+0100] [ALPM] upgraded pacman (6.0.1-8 -> 6.0.2-5)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php-apache (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php-fpm (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php-gd (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php-intl (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:46+0100] [ALPM] upgraded php-pgsql (8.1.12-1 -> 8.1.12-2)
[2022-11-06T09:45:47+0100] [ALPM] upgraded postgresql-old-upgrade (13.8-2 -> 13.8-3)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python (3.10.8-2 -> 3.10.8-3)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-cryptography (38.0.2-1 -> 38.0.2-2)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-setuptools (1:64.0.0-1 -> 1:64.0.1-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-distro (1.7.0-1 -> 1.8.0-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-oauthlib (3.2.0-1 -> 3.2.2-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-zope-hookable (5.2-1 -> 5.3-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded python-zope-proxy (4.5.1-1 -> 4.6.0-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded rsync (3.2.7-1 -> 3.2.7-2)
[2022-11-06T09:45:49+0100] [ALPM] upgraded srt (1.5.1-1 -> 1.5.1-3)
[2022-11-06T09:45:49+0100] [ALPM] upgraded sudo (1.9.12-1 -> 1.9.12.p1-1)
[2022-11-06T09:45:49+0100] [ALPM] upgraded systemd-sysvcompat (251.7-1 -> 251.7-4)
[2022-11-06T09:49:29+0100] [ALPM] upgraded postgresql-libs (14.5-2 -> 14.5-4)
[2022-11-06T09:49:30+0100] [ALPM] upgraded postgresql (14.5-2 -> 14.5-4)

@the-djmaze
Copy link
Owner

Looks like your upgrade forgot PHP sodium (or removed it).

I've modified the Crypt class to catch these kind of errors.

@alabre
Copy link
Author

alabre commented Nov 6, 2022

Hey, thank you for the quick reply. I just installed php-sodium - it was never installed and installing didn't change anything on the behaviour or error messages. I will check your update as soon as available and let you know if there is any news.

@the-djmaze
Copy link
Owner

I made changes to the CSP and you can try v2.20.3

@the-djmaze the-djmaze added Nextcloud bug Something isn't working labels Nov 7, 2022
@alabre
Copy link
Author

alabre commented Nov 8, 2022

Hi, I upgraded to version 2.20.5 and get the following information in the nextcloud protocol logs while unsuccessfully trying to log in.

When I click on the snappymail icon in the app bar the login page comes in and I get the log message

[PHP] Fehler: Undefined variable $sEmail at /.../data/appdata_snappymail/data/default/plugins/nextcloud/index.php#186

GET /apps/snappymail/?/AppData/0/3899633...14/


When I then try to log in (maybe a followup error of the first one...) Just recognized that the four messages do not come at once.

[PHP] Fehler: SnappyMail\Crypt::opensslDecrypt(): $data or $iv is empty string at /.../apps/snappymail/app/snappymail/v/2.20.5/app/libraries/snappymail/crypt.php#63

GET /apps/snappymail/?/Css/0/User/-/Nextcloud@custom/-/6...d76d495ca487a3/Hash/-/Json/


[PHP] Fehler: SnappyMail\Crypt::opensslDecrypt(): $data or $iv is empty string at /.../apps/snappymail/app/snappymail/v/2.20.5/app/libraries/snappymail/crypt.php#63

POST /apps/snappymail/?/Json/&q[]=/0/


[PHP] Fehler: SnappyMail\Crypt::opensslDecrypt(): $data or $iv is empty string at /.../apps/snappymail/app/snappymail/v/2.20.5/app/libraries/snappymail/crypt.php#63

POST /apps/snappymail/?/Json/&q[]=/0/

@the-djmaze
Copy link
Owner

Go to SnappyMail admin and update extension

@alabre
Copy link
Author

alabre commented Nov 8, 2022

Upgraded to 2.20.6 before doing this...
When I try to call the admin page, I get a login screen and when I log in with the admin credentials I get a white screen and in the logs. So, the automatic login to admin does not work any more - it did before.

[PHP] Fehler: SnappyMail\Crypt::opensslDecrypt(): $data or $iv is empty string at /.../apps/snappymail/app/snappymail/v/2.20.6/app/libraries/snappymail/crypt.php#63

[PHP] Fehler: Implicit conversion from float 844383.955001831 to int loses precision at /.../apps/snappymail/app/snappymail/v/2.20.6/app/libraries/RainLoop/Actions.php#887

If it helps, I can change files directly, I am working on a VPS with access to everything... Thank you for your patience.

@alabre
Copy link
Author

alabre commented Nov 9, 2022

Hi, so, first of all: Installing and enabling Sodium works here, too. I am sorry, but I am not changing my php config regularly so that I missed that some days ago.
So, as the solutions of #641 and this one seem to be identical and there is more information in #641 I suggest to close this one and have the other one alive.

@the-djmaze
Copy link
Owner

I suggest to close this one and have the other one alive.

Yes, done 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants