Bugzilla – Attachment 1508 Details for
Bug 3674
Creating users with empty password
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bugfix
0001--bug-3674-allow-users-creation-with-disabled-passw.patch (text/plain), 1.54 KB, created by
Chris Cormack
on 2009-09-29 09:20:00 UTC
(
hide
)
Description:
bugfix
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2009-09-29 09:20:00 UTC
Size:
1.54 KB
patch
obsolete
>From e2a8cdfc160b92eadf731de5373fafa487cb2075 Mon Sep 17 00:00:00 2001 >From: Nahuel ANGELINETTI <nahuel.angelinetti@biblibre.com> >Date: Tue, 29 Sep 2009 11:19:07 +0200 >Subject: [PATCH] (bug #3674) allow users creation with disabled password >Content-Type: text/plain; charset="utf-8" > >--- > C4/Auth.pm | 2 +- > C4/Members.pm | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index eb7a464..9429ea9 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1222,7 +1222,7 @@ sub checkpw { > my ( $md5password, $cardnumber, $borrowernumber, $userid, $firstname, > $surname, $branchcode, $flags ) > = $sth->fetchrow; >- if ( md5_base64($password) eq $md5password ) { >+ if ( ( md5_base64($password) eq $md5password ) and ($md5password ne "!") ) { > > C4::Context->set_userenv( "$borrowernumber", $userid, $cardnumber, > $firstname, $surname, $branchcode, $flags ); >diff --git a/C4/Members.pm b/C4/Members.pm >index d44d55f..fcc689e 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -696,8 +696,9 @@ Returns the borrowernumber > sub AddMember { > my (%data) = @_; > my $dbh = C4::Context->dbh; >- $data{'userid'} = '' unless $data{'password'}; >+ > $data{'password'} = md5_base64( $data{'password'} ) if $data{'password'}; >+ $data{'password'} = '!' if (not $data{'password'} and $data{'userid'}); > > # WE SHOULD NEVER PASS THIS SUBROUTINE ANYTHING OTHER THAN ISO DATES > # IF YOU UNCOMMENT THESE LINES YOU BETTER HAVE A DARN COMPELLING REASON >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3674
:
1508
|
4006
|
4307
|
4309