On removing traces of update_password in the codebase, I noticed the use case in Auth_with_ldap.pm which basically skips any password quality check. I'm not sure if that 'feature' is or should be used. For now, we should provide this alternate behaviour. The best approach is adding an 'unsafe' param.
Created attachment 83491 [details] [review] Bug 22047: Unit tests
Created attachment 83492 [details] [review] Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password This patch makes Koha::Patron->set_password expect a hashref as param and adds support for an 'skip_validation' param to be passed. Its purpose is to make the method skip the relevant password strength checks if required. It targets the Auth_with_ldap.pm usage when the 'update_password' flag is set in the configuration. The tests on this bug cover this use case so, to test: - Apply the tests patch - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t => FAIL: Tests fail, code doesn't work as expected - Apply this patch - Run: k$ prove t/db_dependent/Koha/Patrons.t => SUCCESS: Tests pass! Yay! - Sign off :-D
Created attachment 83493 [details] [review] Bug 22047: Fix opac/opac-passwd.pl call
Created attachment 83582 [details] [review] Bug 22047: Unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 83583 [details] [review] Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password This patch makes Koha::Patron->set_password expect a hashref as param and adds support for an 'skip_validation' param to be passed. Its purpose is to make the method skip the relevant password strength checks if required. It targets the Auth_with_ldap.pm usage when the 'update_password' flag is set in the configuration. The tests on this bug cover this use case so, to test: - Apply the tests patch - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t => FAIL: Tests fail, code doesn't work as expected - Apply this patch - Run: k$ prove t/db_dependent/Koha/Patrons.t => SUCCESS: Tests pass! Yay! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 83584 [details] [review] Bug 22047: Fix opac/opac-passwd.pl call Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 83594 [details] [review] Bug 22047: Unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 83595 [details] [review] Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password This patch makes Koha::Patron->set_password expect a hashref as param and adds support for an 'skip_validation' param to be passed. Its purpose is to make the method skip the relevant password strength checks if required. It targets the Auth_with_ldap.pm usage when the 'update_password' flag is set in the configuration. The tests on this bug cover this use case so, to test: - Apply the tests patch - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t => FAIL: Tests fail, code doesn't work as expected - Apply this patch - Run: k$ prove t/db_dependent/Koha/Patrons.t => SUCCESS: Tests pass! Yay! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 83596 [details] [review] Bug 22047: Fix opac/opac-passwd.pl call Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Minor rebase needed
Created attachment 84422 [details] [review] Bug 22047: Unit tests Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 84423 [details] [review] Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password This patch makes Koha::Patron->set_password expect a hashref as param and adds support for an 'skip_validation' param to be passed. Its purpose is to make the method skip the relevant password strength checks if required. It targets the Auth_with_ldap.pm usage when the 'update_password' flag is set in the configuration. The tests on this bug cover this use case so, to test: - Apply the tests patch - Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t => FAIL: Tests fail, code doesn't work as expected - Apply this patch - Run: k$ prove t/db_dependent/Koha/Patrons.t => SUCCESS: Tests pass! Yay! - Sign off :-D Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Created attachment 84424 [details] [review] Bug 22047: Fix opac/opac-passwd.pl call Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Awesome work all! Pushed to master for 19.05
Invisible enhancement, I'm choosing to backport this to the 18.11.x series for 18.11.03
missing dependency for 18.05.x will not backport