Skip to content

Commit

Permalink
fix: login failure
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail committed Jan 1, 2025
1 parent d1d665b commit da7d0f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/models/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ class Meta:
logo = models.CharField(max_length=2048, null=True, help_text="用户头像")

def set_password(self, raw_password):
self.password = encrypt_passwd(raw_password)
self.password = encrypt_passwd(self.email + raw_password)

def check_password(self, raw_password):
return bool(encrypt_passwd(raw_password) == self.password)
return bool(encrypt_passwd(self.email + raw_password) == self.password)

def is_anonymous(self):
return False
Expand Down

0 comments on commit da7d0f8

Please sign in to comment.