Import patrons uses), matchpoint cardnumber.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44343 Bug ID: 44343 Summary: export_borrowers.pl exports password hashes and two-factor secrets by default, and an exported hash cannot be imported back Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: jake.deery@openfifth.co.uk, robin@catalyst.net.nz Target Milestone: --- misc/export_borrowers.pl with no --field exports every column of borrowers. That includes password (the bcrypt hash) and secret (the patron's two-factor authentication secret, in clear). Staff accounts are patrons, so a routine "export all patrons" CSV carries every staff member's 2FA secret and password hash to wherever the file goes. The hash is also no use in the file: patron import treats a password column as a plain password, so Koha::Patron->store hashes the hash again and the patron cannot log in. To reproduce (main 186bbe7): 1. Create a patron with userid k012user and password Koha-K012-pass1. 2. perl misc/export_borrowers.pl -H --where "borrowernumber=<that patron>" The header has password and secret; the line has $2a$08$... and the 2FA secret. 3. With a field list that includes password (so the file can be imported as it is), e.g. -f cardnumber -f surname -f firstname -f categorycode -f branchcode -f userid -f password, delete the patron and import the file with Koha::Patrons::Import (what Tools 4. The patron is created with a password column starting $2a$08$ (a hash of the hash) and logging in with Koha-K012-pass1 is refused. Expected: the default export leaves password and secret out; they are exported only when named with --field. (The all-fields file cannot be imported as it is on main for other reasons, see bug 31720 and bug 44282.) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.