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

屏蔽/admin/login登录入口 #1541

Merged
merged 1 commit into from
May 25, 2022
Merged

Conversation

nick2wang
Copy link
Collaborator

防止通过/admin/login登录绕过2FA验证

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #1541 (97e6af4) into master (4d96ac6) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1541   +/-   ##
=======================================
  Coverage   76.84%   76.84%           
=======================================
  Files          91       91           
  Lines       14309    14309           
=======================================
  Hits        10996    10996           
  Misses       3313     3313           
Impacted Files Coverage Δ
common/middleware/check_login_middleware.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d96ac6...97e6af4. Read the comment docs.

Copy link
Collaborator

@LeoQuote LeoQuote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@LeoQuote LeoQuote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果管理员因为忘记了 2fa 被关在外面, 有没有办法临时禁用 2fa ?

@nick2wang
Copy link
Collaborator Author

如果管理员因为忘记了 2fa 被关在外面, 有没有办法临时禁用 2fa ?

从2fa_config表删除对应用户的那条配置即可关闭该用户的2fa验证

@nick2wang
Copy link
Collaborator Author

管理员应该比普通用户更依赖2fa,毕竟权限太高了,除非额外增加一种验证方式来重置或关闭,不然系统内部不应该保留一个只需要验证密码的后门来应对无法获取2fa验证码这种情况,那样的话2fa就形同虚设了

Copy link
Collaborator

@LeoQuote LeoQuote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LeoQuote LeoQuote merged commit 14b1f1c into hhyo:master May 25, 2022
@nick2wang nick2wang deleted the block-admin-login branch May 25, 2022 09:42
@nick2wang
Copy link
Collaborator Author

更新了丢失2FA凭证无法登陆的处理方法:https://github.com/hhyo/Archery/wiki/FAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants