-
Notifications
You must be signed in to change notification settings - Fork 69
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
Ask for new passwords twice, ask for current password on change #180
Conversation
…d, improve page layout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work on this @lambdaTotoro, I agree with the value of this feature!
I think variable names are crucial to code comprehension so I suggest some changes to those. I also think three functions receive the new password confirmation that perhaps shouldn't be bothered with that - but that instead the new password confirmation should be made even before those functions are called, as they would only be if the new passwords provided matched.
To summarize, my suggested changes are:
- Suggested more verbose variable names
-
correctpw
, perhaps tocorrect_password_provided
-
confirmation
/con_password
, perhaps tonew_password_conf
-
match
parameter, perhaps tonew_password_conf_ok
-
password_prove
, perhapsold_password_input
-
password_input
, perhapsnew_password_input
-
password_confirm
, perhapsnew_password_conf_input
-
- Suggested to not pass on the new password confirmation to:
-
user_change_password
-
change_password
-
create_user
-
Happy to change the variable names and such as you suggest, but I'm unsure about (not) handing through the confirmation passwords to the functions in question. It seemed fitting to me because they already contain similar logic (see my comment). What are your thought on that? |
@lambdaTotoro can you amend the commit to not mention me with @consideRatio ? It will make ge get norifications far into the future as this commit is processed in various locations. |
You get notifications when anything processes any commit with your handle in it?! |
c23c2cb
to
882ab0a
Compare
That should do it, right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost ready for merge, i made one code suggestion that I think may be critical.
Could you trial it out end-to-end as well? I think our tests wouldn't capture issues like the one I may have spotted so it could be good to do a full end-to-end test of using the related input forms.
I have fixed the issue you found and tested the whole thing end-to-end again, it all works as expected now. :) |
@lambdaTotoro sorry for the confusion I recalled incorrectly that
So, please exclude the |
I was under the impression it still might affect the object because the kwargs are being updated into to dictionary after it's created with the |
aec917f
to
7b56ac6
Compare
I think when we call def my_func(key1, key2, **kwargs):
# kwargs will hold key3, but not key1 and key2, I think. Okay I verified this! So the tricky part was that when we call |
Thanks for verifying that. Anything else left to do on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time with the review iterations @lambdaTotoro!
Thanks for taking the time to review and being patient with me, @consideRatio. This PR really drove home the message of not just merging your own contributions willy-nilly! |
This PR brings the authenticator up to spec on some very standard security and usability practices.
Closes #170. Closes #73.