Bugzilla – Attachment 52316 Details for
Bug 16719
LDAP: Using empty strings as 'failsafe' attribute mapping defeats database constraints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch: proper NULL mapping
0001-Empty-strings-aren-t-failsafe.patch (text/plain), 700 bytes, created by
Oliver Behnke
on 2016-06-13 13:45:43 UTC
(
hide
)
Description:
Patch: proper NULL mapping
Filename:
MIME Type:
Creator:
Oliver Behnke
Created:
2016-06-13 13:45:43 UTC
Size:
700 bytes
patch
obsolete
>diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -248,9 +248,9 @@ sub ldap_entry_2_hash { > my $data = $memberhash{ lc($mapping{$key}->{is}) }; # Net::LDAP returns all names in lowercase > $debug and printf STDERR "mapping %20s ==> %-20s (%s)\n", $key, $mapping{$key}->{is}, $data; > unless (defined $data) { >- $data = $mapping{$key}->{content} || ''; # default or failsafe '' >+ $data = $mapping{$key}->{content} || undef; # default or undef (NULL) > } >- $borrower{$key} = ($data ne '') ? $data : ' ' ; >+ $borrower{$key} = $data > } > $borrower{initials} = $memberhash{initials} || > ( substr($borrower{'firstname'},0,1)
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 16719
:
52316
|
53124
|
98560
|
98561
|
98573
|
98574
|
98575