Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
piloos opened this issue Aug 17, 2015 · 1 comment
Closed

Comments

@piloos
Copy link

piloos commented Aug 17, 2015

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
Copy link
Owner

tarak commented Aug 30, 2015

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?

piloos pushed a commit to piloos/django-password-policies that referenced this issue Aug 31, 2015
@tarak tarak closed this as completed in bb959b9 Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants