owncloud / twofactor_totp

🔑 Second factor TOTP (Google Authenticator) provider for ownCloud
GNU Affero General Public License v3.0
9 stars 9 forks source link

Fix problem with enforced 2fa and encryption #305

Closed jvillafanez closed 8 months ago

jvillafanez commented 8 months ago

Ref: https://github.com/owncloud/enterprise/issues/6139

The problem was caused by an unexpected redirection which caused a second secret to be generated and stored, and it was different than the one shown in the QR.

The PR will only create new secrets if the user doesn't have one, otherwise it will show the same QR (if it hasn't been verified)

sonarcloud[bot] commented 8 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

pako81 commented 8 months ago

Manual tests confirm this solves the issue 👍 Users for which a secret already exists in the DB would need to remove and re-add the account on their two-factor authentication app.