Skip to content

Commit

Permalink
Fix encoding of EAP secrets with newer Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasbrunner committed Oct 3, 2023
1 parent eb416ee commit 179becd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions strongMan/apps/eap_secrets/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ def my_salt(self):
@property
def my_salted_password(self):
password = self.my_salt + self.cleaned_data["password"]
password_bytes = str.encode(password)
return password_bytes
return password

@my_salted_password.setter
def my_salted_password(self, value):
Expand All @@ -47,8 +46,7 @@ def my_password(self):
password = self.cleaned_data["password"]
if password == "":
return None
password_bytes = str.encode(password)
return password_bytes
return password

@my_password.setter
def my_password(self, value):
Expand Down

0 comments on commit 179becd

Please sign in to comment.