Bug 21976 - koha-reset-passwd does not deal with password restrictions
Summary: koha-reset-passwd does not deal with password restrictions
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 17746 18298
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-07 14:37 UTC by Jonathan Druart
Modified: 2020-08-19 07:08 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21976: Make koha-reset-passwd respect restrictions (4.83 KB, patch)
2019-02-05 17:32 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2018-12-07 14:37:53 UTC
Like minPasswordLength and RequireStrongPassword
Comment 1 Jonathan Druart 2018-12-07 15:34:58 UTC
Must it call Koha::AuthUtils::generate_password? See the discussion on bug 17746.
Comment 2 Tomás Cohen Arazi 2019-02-05 17:09:24 UTC

*** This bug has been marked as a duplicate of bug 17746 ***
Comment 3 Tomás Cohen Arazi 2019-02-05 17:10:56 UTC
I think this one should remain open, and probably be an enhancement on top of bug 17746. Sorry for the confusion.
Comment 4 Tomás Cohen Arazi 2019-02-05 17:31:43 UTC
I wrote a patch for this, but then also noticed the 12-digit password generated by pwgen 12 will probably always pass.
Comment 5 Tomás Cohen Arazi 2019-02-05 17:32:12 UTC
Created attachment 84799 [details] [review]
Bug 21976: Make koha-reset-passwd respect restrictions

This patch makes the set_password.pl script default to respect the
restrictions, and adds a --skip_validation parameter to it.

koha-reset-passwd is adapted so it also accepts this parameter. The
result is the default behaviour respects the restrictions, and they can
be skipped.

To test:
- Try with and without the option switch
- Notice the randomly generated password is always strongest than what
we enforce.
- Sign off
Comment 6 Liz Rea 2019-03-26 00:06:45 UTC
Hi,

This patch fails to apply with 

Auto-merging misc/admin/set_password.pl
Auto-merging debian/scripts/koha-reset-passwd
CONFLICT (content): Merge conflict in debian/scripts/koha-reset-passwd

Sorry :(

Cheers,
Liz