Open
Bug 1001288
Opened 11 years ago
Updated 11 years ago
contrib/syncLDAP.pl throws "undefined value as an ARRAY reference"
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
ASSIGNED
People
(Reporter: keith.long, Assigned: selsky)
Details
Attachments
(2 files)
|
795 bytes,
patch
|
Details | Diff | Splinter Review | |
|
622 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; rv:11.0) like Gecko
Steps to reproduce:
1. Installed Bugzilla (Fedora 20, yum install bugzilla bugzilla-contrib)
2. Setup and configured LDAP and new users can log into Bugzilla using passwords from LDAP server (Active Directory)
3. In root shell, at /usr/share/bugzilla, run ./contrib/syncLDAP.pl
Actual results:
Can't use an undefined value as an ARRAY reference at ./contrib/syncLDAP.pl line 145.
Expected results:
Users in AD to be populated in Bugzilla.
Note: AD has user accounts without "mail" attribute. Is there a way to populate only users in AD that has "mail" attribute?
1. I'm running Bugzilla 4.4 and see this same issue.
2. In addition, if the LDAPmailattribute value isn't lowercase, you will still get the error "Can't use an undefined value as an ARRAY reference".
This is because as_struct() from Net::LDAP::Search returns the attribute names in lowercase.
Ref: https://metacpan.org/pod/Net::LDAP::Search#METHODS
The value of LDAPmailattribute must be converted to all lowercase before using.
Updated•11 years ago
|
Assignee: user-accounts → general
Component: User Accounts → Bugzilla-General
Summary: Bugzilla - Contrib - syncLDAP.pl --undefined value as an ARRAY reference → contrib/syncLDAP.pl throws "undefined value as an ARRAY reference"
| Assignee | ||
Comment 2•11 years ago
|
||
Keith/Marshall:
Can you test this patch?
Assignee: general → selsky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(keith.long)
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(keith.long) → needinfo?(mamills.gseit+mozilla)
Test: perl.exe -T .\contrib\syncLDAP.pl
Results: attachment 8536216 [details] [diff] [review] failed with "Can't use an undefined value as an ARRAY reference at .\contrib\syncLDAP.pl line 131."
This patch worked with the above test.
When I applied the patch from attachment 8536216 [details] [diff] [review]; it failed the following:
Test: perl.exe -T .\contrib\syncLDAP.pl
Results: Failed with "Can't use an undefined value as an ARRAY reference at .\contrib\syncLDAP.pl line 131."
When I applied the patch from attachment 8543362 [details] [diff] [review]; it passed the above test. Note, this patch was applied to the head of bugzilla 4.4 (http://git.mozilla.org/?p=bugzilla/bugzilla.git;a=shortlog;h=refs/heads/4.4 [github])
Flags: needinfo?(mamills.gseit+mozilla)
You need to log in
before you can comment on or make changes to this bug.
Description
•