tarak / django-password-policies

Django unicode-aware password policies.
Other
59 stars 92 forks source link

Forcing password change middleware fails when deploying site with prefix url #41

Closed piloos closed 9 years ago

piloos commented 9 years ago

Hello,

I am using django-password-policies v0.3.2 with django 1.8.3.

When I deploy my Django site with a uwsgi prefix, the middleware that should enforce a password change fails. It is letting the user through.

I could fix the issue by changing resolve(request.path) into resolve(request.path_info) on line 143 in middleware.py.

Request.path_info does not contain the site prefix and will resolve. Request.path contains the prefix and will not resolve letting the user pass...

Am I doing something wrong or is this a bug?

kind regards, Lode

tarak commented 9 years ago

Sorry for a late response. Changes in my work situation kept me busy.

Reading the django docs I think that your fix is the appropriate way to go. I have to admit that I do not have time to work on this app a lot and that the middleware needs a lot more attention... Could you submit a PR?