View Issue Details

IDProjectCategoryView StatusLast Update
0005708SOGoWeb Preferencespublic2023-03-17 07:16
Reporterkvh Assigned Tosebastien  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.8.0 
Fixed in Version5.8.1 
Summary0005708: Two factor authentication disappeared on Sogo web interface
Description

Sogo doesn't ask you to enter your 2FA code during logging in.
Also, when going to "Preferences" > "General" > tab "Password" (and also tab "General"), the option to switch on 2FA disappeared.

TagsNo tags attached.

Activities

sebastien

sebastien

2023-03-13 07:14

administrator   ~0016724

Just tested in demo.sogo.nu, no issues.

Sebastien

sebastien

sebastien

2023-03-13 07:32

administrator   ~0016725

This option is in general not in password tab
Could you :

  • Try to reproduce also on demo.sogo.nu
  • Check that your templates (wox files) are up to date

Sebastien

kvh

kvh

2023-03-13 18:20

reporter   ~0016730

Hello Sebastien

Many thanks in advance!
kvh

sebastien

sebastien

2023-03-13 20:14

administrator   ~0016731

Unfortunately no, maybe a script can do this.
The template file for login is https://github.com/Alinto/sogo/blob/master/UI/Templates/MainUI/SOGoRootPage.wox

Here is a clue : sometimes the templates can be in several folders, for example /var/lib/sogo/GNUstep/Library/SOGo, /usr/share/GNUstep/SOGo, /usr/lib/GNUstep/SOGo/

You need to remove the old unused folders because SOGo can load them in priority.
You should keep only folder with the following hashsum (you can also check file date)

MD5 (UI/Templates/MainUI/SOGoRootPage.wox) = 04ae2310dcb848cf48c210fbca737ba4
kvh

kvh

2023-03-13 21:03

reporter   ~0016733

Ok, so I removed these three directories. I Removed and reinstalled sogo and sogo-activesync. I now have only one of your listed directories. When running the following, I get the same md5 hash as you have.

/usr/lib/GNUstep/SOGo# md5sum Templates/MainUI/SOGoRootPage.wox
04ae2310dcb848cf48c210fbca737ba4 Templates/MainUI/SOGoRootPage.wox

After this, I did a reboot. And I still don't have any option to enable 2FA.

sebastien

sebastien

2023-03-14 15:37

administrator   ~0016739

According the missing 2FA you're talking is in the login.

You can display source code of the page (ctrl + U) and compare with wox file to be sure this is the same version

Sebastien

kvh

kvh

2023-03-14 19:24

reporter   ~0016740

I compared the source (rendered html) of the login page /SOGo/so/ with the contents of https://github.com/Alinto/sogo/blob/master/UI/Templates/MainUI/SOGoRootPage.wox and did the same with the rendered html on the preferences page /SOGo/so/<my-username>/Preferences#!/general with https://github.com/Alinto/sogo/blob/master/UI/Templates/PreferencesUI/UIxPreferences.wox. You can see the structure is matching, but in the wox files at GitHub, you can see the following '<var:if condition="isTotpEnabled">.....</var:if>'. The content between these two tags doesn't render at the login and preferences screens. So I'm wondering if there is a way to set the variables isTotpEnabled, MFA_CONFIG to true?

kvh

kvh

kvh

2023-03-14 20:04

reporter   ~0016741

I tried to remove the <var:if condition="isTotpEnabled"> and it's corresponding </var:if> both in MainUI/SOGoRootPage.wox and PreferencesUI/UIxPreferences.wox, restarted SOGo. And in the General tab in Preferences, the option to enable 2FA is visible. When checking the checkbox, I can see the explanation ("You must enter this key ...."), but I don't see a QR code. In the browser console, I see "TypeError: e.text is undefined link sgQrCode.directive.js:30 Angular 38 <sg-qr-code> angular.js:15697:15".

kvh

sebastien

sebastien

2023-03-14 21:10

administrator   ~0016742

This is a compilation flag -DMFA_CONFIG=1. Each package on SOGo build system enables this flag.
Do you compile SOGo yourself ? What is the linux distribution / version ?

kvh

kvh

2023-03-14 21:20

reporter   ~0016743

No, I didn't compile it myself. I used the 'apt-get install sogo' command. Linux distribution and version: Ubuntu 22.04.2 LTS. I followed the instructions on https://bugs.sogo.nu/view.php?id=5511#c16677

sebastien

sebastien

2023-03-15 08:50

administrator   ~0016744

Maybe there is an issue with compilation flags on Ubuntu Jammy but this would be surprising.

I will have a look on that, but no time now. If anybody can try a clean install and try to reproduce it would be helpful

Sebastien

sebastien

sebastien

2023-03-15 08:52

administrator   ~0016745

Oops found the issue ;)

It missed the flag here https://github.com/Alinto/sogo/blob/master/packaging/debian/rules

sebastien

sebastien

2023-03-15 08:56

administrator   ~0016746

Commit : https://github.com/Alinto/sogo/commit/66c728ca8401c8c5304580a65f0ce97b1e8792bb

Let's try next nightly build

sebastien

sebastien

2023-03-16 07:19

administrator   ~0016752

Last edited: 2023-03-17 07:16

There is a missing lib in container, II have to add it and rebuild
[EDIT] : Done

Issue History

Date Modified Username Field Change
2023-03-12 23:05 kvh New Issue
2023-03-13 07:14 sebastien Note Added: 0016724
2023-03-13 07:14 sebastien Assigned To => sebastien
2023-03-13 07:14 sebastien Status new => feedback
2023-03-13 07:32 sebastien Note Added: 0016725
2023-03-13 18:20 kvh Note Added: 0016730
2023-03-13 18:20 kvh Status feedback => assigned
2023-03-13 20:14 sebastien Note Added: 0016731
2023-03-13 20:14 sebastien Status assigned => feedback
2023-03-13 21:03 kvh Note Added: 0016733
2023-03-13 21:03 kvh Status feedback => assigned
2023-03-14 15:37 sebastien Note Added: 0016739
2023-03-14 19:24 kvh Note Added: 0016740
2023-03-14 20:04 kvh Note Added: 0016741
2023-03-14 21:10 sebastien Note Added: 0016742
2023-03-14 21:20 kvh Note Added: 0016743
2023-03-15 08:50 sebastien Note Added: 0016744
2023-03-15 08:52 sebastien Note Added: 0016745
2023-03-15 08:56 sebastien Note Added: 0016746
2023-03-15 13:29 sebastien Status assigned => resolved
2023-03-15 13:29 sebastien Resolution open => fixed
2023-03-15 13:29 sebastien Fixed in Version => 5.8.1
2023-03-16 07:19 sebastien Status resolved => assigned
2023-03-16 07:19 sebastien Note Added: 0016752
2023-03-17 07:16 sebastien Note Edited: 0016752
2023-03-17 07:16 sebastien Status assigned => resolved