Skip to content

Commit

Permalink
Merge pull request #69 from pmayer/hotfix/login-form-password
Browse files Browse the repository at this point in the history
Changed password field to not strip its data
  • Loading branch information
jbittel committed Oct 5, 2018
2 parents fb5a10b + ce82139 commit 3832052
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mama_cas/forms.py
@@ -1,5 +1,6 @@
import logging

import django
from django import forms
from django.conf import settings
from django.contrib.auth import authenticate
Expand All @@ -18,6 +19,9 @@ class LoginForm(forms.Form):
error_messages={'required':
_("Please enter your password")})

if django.VERSION >= (1, 9):
password.strip = False

def __init__(self, *args, **kwargs):
self.request = kwargs.pop('request', None)
super(LoginForm, self).__init__(*args, **kwargs)
Expand Down

0 comments on commit 3832052

Please sign in to comment.