mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing bugs around login with blank password using full password. Also fixing bug in signups with no username.
This commit is contained in:
parent
1c761c8eb0
commit
ed8722e653
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ class LoginForm(forms.Form):
|
|||
email_username = User.objects.filter(email=username)
|
||||
if email_username:
|
||||
self.user_cache = authenticate(username=email_username[0].username, password=password)
|
||||
if self.username is None:
|
||||
if self.user_cache is None:
|
||||
self.user_cache = authenticate(username=email_username[0].username, password="")
|
||||
if self.user_cache is None:
|
||||
# logging.info(" ***> [%s] Bad Login: TRYING JK-LESS PASSWORD" % username)
|
||||
|
@ -97,8 +97,8 @@ class SignupForm(forms.Form):
|
|||
return self.cleaned_data['email']
|
||||
|
||||
def clean(self):
|
||||
username = self.cleaned_data['username']
|
||||
password = self.cleaned_data['password']
|
||||
username = self.cleaned_data.get('username', '')
|
||||
password = self.cleaned_data.get('password', '')
|
||||
exists = User.objects.filter(username__iexact=username).count()
|
||||
if exists:
|
||||
user_auth = authenticate(username=username, password=password)
|
||||
|
|
Loading…
Add table
Reference in a new issue