Bug 11013

Summary: Tests broken by new crypto stuff
Product: Koha Reporter: Robin Sheat <robin>
Component: AuthenticationAssignee: Robin Sheat <robin>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: major    
Priority: P3 CC: bgkriegel, dpavlin, jonathan.druart
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 9611    
Bug Blocks:    
Attachments: Bug 11013 - move hashing functions into their own module
Bug 11013 - move hashing functions into their own module
[SIGNED-OFF] Bug 11013 - move hashing functions into their own module
Bug 11013 - make copyright headers current
[SIGNED-OFF] Bug 11013 - make copyright headers current

Description Robin Sheat 2013-10-08 03:11:56 UTC
Bug 9611 broke the test cases when running without a database (i.e. when packages are being built.)

The problem is that the hashing stuff was put into C4::Auth, which makes sense, however this means that C4::Members has to use C4::Auth, and C4::Auth requires a database, and many things use C4::Members...

So I'm going to move the hashing stuff into its own place in the Koha namespace.
Comment 1 Robin Sheat 2013-10-08 05:11:30 UTC Comment hidden (obsolete)
Comment 2 Robin Sheat 2013-10-08 05:22:57 UTC
Upgraded the importance, as packages can't be built while this bug is here.
Comment 3 Robin Sheat 2013-10-08 05:27:35 UTC Comment hidden (obsolete)
Comment 4 Bernardo Gonzalez Kriegel 2013-10-08 11:02:15 UTC
Created attachment 21873 [details] [review]
[SIGNED-OFF] Bug 11013 - move hashing functions into their own module

As the hashing functions were centralised into C4::Auth, this required
more modules (C4::Members in particular) to use it. However, C4::Auth
uses the database, and so anything that used C4::Members failed to load
in the 00-load.t test. This patch moves the hashing into its own small
module so this isn't an issue.

Test plan:
* Ensure that password related functions work:
** Creating a user account
** Logging in
** Changing a password (OPAC and staff client)
** LDAP logins still work like they should
* Ensure that tests pass without a database server present

Note: there are testing notes for LDAP on bug 9611 that'll bypass the
need to set up an LDAP server.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All Works. No koha-qa errors

Test
1) patch applied
2) new user created
3) change pass from opac/staff
4) change pass using LDAP (sort of, same as on Bug 9611)

NOTE: Robin, you just sent an email about copyright headers,
KohaPassword.pm's reads "...either version 2 of the License,...",
coding guidelines suggests other wording and version 3 of GPL.
Comment 5 Robin Sheat 2013-10-08 11:27:00 UTC
(In reply to Bernardo Gonzalez Kriegel from comment #4)
> NOTE: Robin, you just sent an email about copyright headers,
> KohaPassword.pm's reads "...either version 2 of the License,...",
> coding guidelines suggests other wording and version 3 of GPL.

That was a test! Actually, it was because I copy-pasted from elsewhere and didn't check. You are totally correct. I'll add a follow-up tomorrow.
Comment 6 Robin Sheat 2013-10-09 03:13:05 UTC Comment hidden (obsolete)
Comment 7 Bernardo Gonzalez Kriegel 2013-10-09 03:26:11 UTC
Created attachment 21888 [details] [review]
[SIGNED-OFF] Bug 11013 - make copyright headers current

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Updated copyright headers ok
Comment 8 Jonathan Druart 2013-10-09 07:35:05 UTC
Robin,
Galen pushed a followup  for bug 9611 (3min after the Bernardo's signoff!), moving the password routines into a new module (Koha::AuthUtils).
These patchs don't apply anymore.
Comment 9 Jonathan Druart 2013-10-09 07:36:46 UTC
In fact I think this report can be marked as resolved/duplicate. I let you change the status, except if you disagree.
Comment 10 Robin Sheat 2013-10-09 07:38:24 UTC
Yeah, if it solves the same problem, that's good too :)

*** This bug has been marked as a duplicate of bug 9611 ***