fix: Add third party login check is block (#15916)

Co-authored-by: wangruidong <940853815@qq.com>
pull/15919/head
fit2bot 2025-08-25 10:51:42 +08:00 committed by GitHub
parent 6d6dec2752
commit e6d02eaf4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -77,6 +77,7 @@ class ThirdPartyLoginMiddleware(mixins.AuthMixin):
ip = get_request_ip(request)
try:
self.request = request
self.check_is_block()
self._check_third_party_login_acl()
self._check_login_acl(request.user, ip)
except Exception as e:

View File

@ -125,7 +125,7 @@ class BlockUtilBase:
BLOCK_KEY_TMPL: str
def __init__(self, username, ip):
self.username = username
username = username.lower() if username else ''
self.ip = ip
self.limit_key = self.LIMIT_KEY_TMPL.format(username, ip)
self.block_key = self.BLOCK_KEY_TMPL.format(username)