Skip to content
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

Prevent leaking password reset token through Referrer header #30

Merged
merged 4 commits into from Jun 9, 2017

Conversation

joshblum
Copy link
Contributor

@joshblum joshblum commented Jun 8, 2017

Fixes #28

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage decreased (-1.4%) to 94.323% when pulling feaffc5 on joshblum:fix-referrer into 89f8c44 on mishbahr:master.

users/urls.py Outdated

from .views import (activate, activation_complete, register,
registration_closed, registration_complete)

# Attempt to use the auth class based views if available.
try:
login_view = auth_views.LoginView.as_view()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this won't work. e.g. LoginView.as_view() need to called w/ template_name as kwarg.

Same issue w/ all the views being called without kwags.

I would prefer that we simply use the class based views.. and add a warning to README for folks to pin their requirements to use version 0.2.1 or earlier for older django.

@mishbahr
Copy link
Owner

mishbahr commented Jun 8, 2017

Thanks for your pull request. Please see comments.

@joshblum
Copy link
Contributor Author

joshblum commented Jun 8, 2017

@mishbahr let me know if you need any other changes!

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage remained the same at 95.682% when pulling 5534166 on joshblum:fix-referrer into 89f8c44 on mishbahr:master.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage remained the same at 95.682% when pulling 5534166 on joshblum:fix-referrer into 89f8c44 on mishbahr:master.

README.rst Outdated
@@ -21,8 +21,9 @@ django-users2
:target: https://coveralls.io/r/mishbahr/django-users2?branch=master


Custom user model for django >=1.5 with support for multiple user types and
lots of other awesome utils (mostly borrowed from other projects).
Custom user model for django >=1.11 with support for multiple user types and
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can we change the wording to something like this:

Custom user model for django >=1.5 with support for multiple user types and lots of other awesome utils (mostly borrowed from other projects). If you are using django < 1.11, please install v0.2.1 or earlier (pip install django-users2<=0.2.1).

So it's clearer that, it still works for the older versions of django.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage remained the same at 95.682% when pulling 5d8a803 on joshblum:fix-referrer into 89f8c44 on mishbahr:master.

@coveralls
Copy link

coveralls commented Jun 8, 2017

Coverage Status

Coverage remained the same at 95.682% when pulling 5d8a803 on joshblum:fix-referrer into 89f8c44 on mishbahr:master.

@mishbahr mishbahr merged commit 434582b into mishbahr:master Jun 9, 2017
@joshblum joshblum deleted the fix-referrer branch June 9, 2017 13:40
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

Successfully merging this pull request may close these issues.

None yet

3 participants