-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
two-factor authentication via nextcloud notification broken in snap 22.2.0snap1 & 22.2.0snap2 #1897
Comments
Same here running server on debian 10 (buster). On 22.1.1snap2 everything works fine but on 22.2.x not. |
Thanks for the issue ref @HansHuckebein7, seems this is not a problem with the snap specifically, then. Note that while you cannot patch the contents of the snap itself, you CAN edit third-party apps (i.e. the ones you opt to install, like 2fa). Those are all available in |
The patch described in an other posting (nextcloud/twofactor_nextcloud_notification#551) lists files, I can't find under ../extra-apps/ but I do find them in the read-only part of the snap installation I need to patch: /core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php root@ts:/snap/nextcloud/current/htdocs/core/Middleware# tree patch: diff --git a/core/Middleware/TwoFactorMiddleware.php b/core/Middleware/TwoFactorMiddleware.php
diff --git a/psalm.xml b/psalm.xml
The directory of the TwoFactor-Middleware lists these files only: root@ts:/var/snap/nextcloud/current/nextcloud/extra-apps/twofactor_nextcloud_notification# tree 17 directories, 216 files |
Ah sad, it seems you're correct, it's part of the API for such apps. We'll need to wait for an upstream update, then. |
THANK YOU! |
btw. Microsoft was disabling print spooler under Windows 10 for security reasons. Hope you don't disable Two-Factor Login for security reasons ;-) |
Describe the bug
two-factor authentication via "nextcloud notification" no longer works after upgrading from 22.1.1snap2 to 22.2.0snap1 or 22.2.0snap2. The notification message still pops up on my phone, asking to approve "Login attempt from ::1", but hitting Approve does not proceed the login process. Instead the login on pc stays stuck on the screen asking me to accept the request, or use a backup code.
This worked without problem on 22.1.1snap2 (and before that as well).
The ::1 instead of a proper IP is a different issue, it originates from the snap running behind an Apache reverse proxy, and the snap not using the X_FORWARDED_FOR headers. This has not been an issue before, but maybe due to tightened security it now is?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The browser login is supposed to proceed after hitting "approve" on the phone notification
OS/snapd/snap version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
$ snap version
snap 2.51.7
snapd 2.51.7
series 16
ubuntu 18.04
kernel 5.4.0-89-generic
(I've reverted back to 22.1.1snap2, as logging in is pretty essential :-) The problem shows on 22.2.0snap2)
$ snap list nextcloud --all
Name Version Rev Tracking Publisher Notes
nextcloud 22.1.1snap2 28549 latest/stable nextcloud✓ -
nextcloud 22.2.0snap2 28586 latest/stable nextcloud✓ disabled
Logs
The debugging output is rather long and contains no errors, or warnings, or other notions timestamped with my failed two-factor authentication attempts. If truly needed I'll try to find a moment to reboot the machine, update the snap, and generate a clean log.
The text was updated successfully, but these errors were encountered: