phpldapadmin fatal error renaming cn
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phpldapadmin (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: phpldapadmin
Ubuntu release: 9.04
phpLDAPAdmin version: 1.1.0.5-6ubuntu3
This bug occurs when attempting to rename a cn entry when the only difference between the old and new cn entry is in capitalization. It's easy to reproduce: just try to rename a cn for (say) an inetOrgPerson by only changing the spelling (e.g. JohnMclean to JohnMcLean), and you should see this:
Fatal error: Call to a member function rename() on a non-object in /usr/share/
Line 171 of this file is as follows:
166: $olddnlower = $this->
167: $newdnlower = $this->
168:
169: $this->
170: unset($
171: $this->
The problem is in line 170.
Let's say the cn was JohnMclean, and we wanted to change it to JohnMcLean (uppercase '"L"). When the old and new names are both lowercased in lines 166 and 167, the code that is executed is effectively this:
unset($
this->entries[
The fix is obviously not to unset the variable if old and new names are equal when lowercased. Fixed code (works now, tested with same name, different name, change only in spelling) is:
169: $this->
***: if ($olddnlower != $newdnlower)
170: unset($
171: $this->
Related branches
CVE References
Changed in phpldapadmin (Ubuntu): | |
status: | Fix Committed → Fix Released |
Fix committed upstream. Will be available in release after 1.2.0.1.
Any bugs about PLA code should be submitted on sourceforge - they may not necessarily be seen here.