[PR #3029] [MERGED] chore: reset two-factor authentication after changing admin credentials #5332

Closed
opened 2026-10-31 20:46:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3029
Author: @sh1shd
Created: 5/22/2025
Status: ✅ Merged
Merged: 7/2/2025
Merged by: @MHSanaei

Base: main ← Head: fix/two-factor-reset


📝 Commits (4)

  • bd80073 chore: add resetTwoFactor argument for main.go
  • 5546c27 chore: reset two-factor authentication after changing admin credentials
  • 6ecdb6e chore: reset two-factor authentication after changing admin credentials
  • 97bc6a3 Merge branch 'main' into fix/two-factor-reset

📊 Changes

19 files changed (+104 additions, -23 deletions)

View changed files

📝 main.go (+15 -2)
📝 web/html/modals/two_factor_modal.html (+5 -13)
📝 web/html/settings.html (+30 -7)
📝 web/service/setting.go (+8 -0)
📝 web/service/user.go (+10 -0)
📝 web/translation/translate.ar_EG.toml (+2 -0)
📝 web/translation/translate.en_US.toml (+2 -0)
📝 web/translation/translate.es_ES.toml (+2 -0)
📝 web/translation/translate.fa_IR.toml (+2 -0)
📝 web/translation/translate.id_ID.toml (+2 -0)
📝 web/translation/translate.ja_JP.toml (+2 -0)
📝 web/translation/translate.pt_BR.toml (+2 -0)
📝 web/translation/translate.ru_RU.toml (+2 -0)
📝 web/translation/translate.tr_TR.toml (+2 -0)
📝 web/translation/translate.uk_UA.toml (+2 -0)
📝 web/translation/translate.vi_VN.toml (+2 -0)
📝 web/translation/translate.zh_CN.toml (+2 -0)
📝 web/translation/translate.zh_TW.toml (+2 -0)
📝 x-ui.sh (+10 -1)

📄 Description

What is the pull request?

This pull request adds a mechanism where two-factor authentication is reset when admin credentials are changed.

Also now if two-factor authentication is enabled and a user tries to change admin credentials through the panel, a confirmation will be requested.

Fixes #3025

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3029 **Author:** [@sh1shd](https://github.com/sh1shd) **Created:** 5/22/2025 **Status:** ✅ Merged **Merged:** 7/2/2025 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/two-factor-reset` --- ### 📝 Commits (4) - [`bd80073`](https://github.com/MHSanaei/3x-ui/commit/bd8007340207510870ea7610f07a38ec22972225) chore: add `resetTwoFactor` argument for main.go - [`5546c27`](https://github.com/MHSanaei/3x-ui/commit/5546c27feac1aa4b3ce99ed194519301d61f97ef) chore: reset two-factor authentication after changing admin credentials - [`6ecdb6e`](https://github.com/MHSanaei/3x-ui/commit/6ecdb6e03bb20ac8d28d8ae4fadcc6825ce46624) chore: reset two-factor authentication after changing admin credentials - [`97bc6a3`](https://github.com/MHSanaei/3x-ui/commit/97bc6a3319ffea94e47bfa0aad99fc2262c3ec84) Merge branch 'main' into fix/two-factor-reset ### 📊 Changes **19 files changed** (+104 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `main.go` (+15 -2) 📝 `web/html/modals/two_factor_modal.html` (+5 -13) 📝 `web/html/settings.html` (+30 -7) 📝 `web/service/setting.go` (+8 -0) 📝 `web/service/user.go` (+10 -0) 📝 `web/translation/translate.ar_EG.toml` (+2 -0) 📝 `web/translation/translate.en_US.toml` (+2 -0) 📝 `web/translation/translate.es_ES.toml` (+2 -0) 📝 `web/translation/translate.fa_IR.toml` (+2 -0) 📝 `web/translation/translate.id_ID.toml` (+2 -0) 📝 `web/translation/translate.ja_JP.toml` (+2 -0) 📝 `web/translation/translate.pt_BR.toml` (+2 -0) 📝 `web/translation/translate.ru_RU.toml` (+2 -0) 📝 `web/translation/translate.tr_TR.toml` (+2 -0) 📝 `web/translation/translate.uk_UA.toml` (+2 -0) 📝 `web/translation/translate.vi_VN.toml` (+2 -0) 📝 `web/translation/translate.zh_CN.toml` (+2 -0) 📝 `web/translation/translate.zh_TW.toml` (+2 -0) 📝 `x-ui.sh` (+10 -1) </details> ### 📄 Description ## What is the pull request? This pull request adds a mechanism where two-factor authentication is reset when admin credentials are changed. Also now if two-factor authentication is enabled and a user tries to change admin credentials through the panel, a confirmation will be requested. Fixes #3025 ## Which part of the application is affected by the change? - [X] Frontend - [X] Backend ## Type of Changes - [X] Bug fix - [ ] New feature - [X] Refactoring - [ ] Other --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:46:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5332
No description provided.