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

feature: ability to change custom password fields #864

Closed
davidcoutadeur opened this issue Mar 13, 2024 · 4 comments · Fixed by #865
Closed

feature: ability to change custom password fields #864

davidcoutadeur opened this issue Mar 13, 2024 · 4 comments · Fixed by #865
Assignees
Milestone

Comments

@davidcoutadeur
Copy link

This feature is proposed and developed by @markus-96

This issue is for discussing the details of this feature.

Here is the original discussion in PR: #751

I think I have written everything needed for this feature. Only the messages shown on the page have to be changed, and also the translations. I will try my best here. I will remove [in progress] when everything is finished and after some additional testing.

You will be able to:

    setup as many app-passwords as you want,
    set the name of the app and the corresponding attribute,
    setup additional password policies,
    setup who changes the password,
    the hash algorithm

You can use it also for updating user information, but I do not think this would be very user friendly.

Also, take care about the discussion regarding this feature: https://github.com/ltb-project/self-service-password/discussions/745
@davidcoutadeur
Copy link
Author

davidcoutadeur commented Mar 13, 2024

This feature is now provided in #865

davidcoutadeur pushed a commit that referenced this issue Apr 4, 2024
markus-96 pushed a commit to markus-96/self-service-password that referenced this issue Apr 8, 2024
markus-96 pushed a commit to markus-96/self-service-password that referenced this issue Apr 8, 2024
davidcoutadeur pushed a commit that referenced this issue Apr 8, 2024
@davidcoutadeur
Copy link
Author

I have tested extensively the feature. The only bug I encounter sometimes is that the field that is modified is not the custompwdfield, but the userPassword. I suspect there is maybe a wrong redirection to index.php at some point, but I can't figure out where is the problem. (and can't reproduce)

I write it here in case we reproduce one day the issue.

@markus-96
Copy link
Contributor

markus-96 commented Apr 17, 2024

maybe it is because of action="#" in changecustompwd.tpl... I dont know if &custompwdindex=N is also submitted there, but should be. Maybe changing action="#" to action="" (although this SHOULD not have an impact) and puting hidden form fields that contain the current number and action would make it more stable..

<form action="" method="post">
    <input type="hidden" name="custompwdindex" value="N">    [ N would have to be set dynamically in the template ]
    <input type="hidden" name="action" value="changecustompwdfield">
    [... the current form ...]
</form>

I do not have time to test this right now, only wanted to share (and also not forget) my thoughts on this.

@davidcoutadeur
Copy link
Author

maybe it is because of action="#" in changecustompwd.tpl... I dont know if &custompwdindex=N is also submitted there, but should be. Maybe changing action="#" to action="" (although this SHOULD not have an impact) and puting hidden form fields that contain the current number and action would make it more stable..

<form action="" method="post">
    <input type="hidden" name="custompwdindex" value="N">    [ N would have to be set dynamically in the template ]
    <input type="hidden" name="action" value="changecustompwdfield">
    [... the current form ...]
</form>

I do not have time to test this right now, only wanted to share (and also not forget) my thoughts on this.

Thank you for your suggestions. I'll give this a look. Anyway, could you do a final check (and test) that everything in the PR #865 is ok for you ? This is one of the last issues before we can release 1.6.0.

davidcoutadeur pushed a commit that referenced this issue Apr 17, 2024
davidcoutadeur pushed a commit that referenced this issue Apr 17, 2024
- fix change_password() call in changecustompwdfield
- fix check_password call in check_password_strength function
- improve custom password field documentation
- add new custom password parameters in default configuration file
- add missing parameters in custompwdfield doc
- clean default values in changecustompwdfield
- isolate policy parameter: pwd_unique_across_custom_password_fields
- fix tests (new param pwd_unique_across_custom_password_fields)
- add documentation for prehook / posthook in custompwdfield
- improve code readibility
- remove useless check for entropy page (#830, #864)
- always consider checkentropy as an available action (#830, #864)
- remove useless test (already done in ltb-ldap project)
- adapt changecustompwdfield.tpl to bootstrap 5.3 upgrade
- improve condition for testing check_password_strength
davidcoutadeur pushed a commit that referenced this issue Apr 17, 2024
- fix change_password() call in changecustompwdfield
- fix check_password call in check_password_strength function
- improve custom password field documentation
- add new custom password parameters in default configuration file
- add missing parameters in custompwdfield doc
- clean default values in changecustompwdfield
- isolate policy parameter: pwd_unique_across_custom_password_fields
- fix tests (new param pwd_unique_across_custom_password_fields)
- add documentation for prehook / posthook in custompwdfield
- improve code readibility
- remove useless check for entropy page (#830, #864)
- always consider checkentropy as an available action (#830, #864)
- remove useless test (already done in ltb-ldap project)
- adapt changecustompwdfield.tpl to bootstrap 5.3 upgrade
- improve condition for testing check_password_strength
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants