fix: 修复用户username 中文 登录失败问题 (#11693)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot 2023-09-25 21:38:56 +08:00 committed by GitHub
parent 7a1214f358
commit a4ff9dace3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,12 +310,6 @@ class UserLoginGuardView(mixins.AuthMixin, RedirectView):
age = self.request.session.get_expiry_age()
self.request.session.set_expiry(age)
def get(self, request, *args, **kwargs):
response = super().get(request, *args, **kwargs)
if request.user.is_authenticated:
response.set_cookie('jms_username', request.user.username)
return response
def get_redirect_url(self, *args, **kwargs):
try:
user = self.get_user_from_session()