fix: Add '/media/' to the list of whitelisted URLs for MFA login (#16412)

Co-authored-by: wangruidong <940853815@qq.com>
This commit is contained in:
fit2bot
2025-12-10 14:19:39 +08:00
committed by GitHub
parent 8548b73063
commit a497b3cf94

View File

@@ -36,7 +36,7 @@ class MFAMiddleware:
# 这个是 mfa 登录页需要的请求, 也得放出来, 用户其实已经在 CAS/OIDC 中完成登录了 # 这个是 mfa 登录页需要的请求, 也得放出来, 用户其实已经在 CAS/OIDC 中完成登录了
white_urls = [ white_urls = [
'login/mfa', 'mfa/select', 'jsi18n/', '/static/', 'login/mfa', 'mfa/select', 'jsi18n/', '/static/',
'/profile/otp', '/logout/', '/profile/otp', '/logout/', '/media/'
] ]
for url in white_urls: for url in white_urls:
if request.path.find(url) > -1: if request.path.find(url) > -1: