|
|
|
Environment:
|
MS Active Directory
|
|
|
If any member of a course has an ID number containing an apostrophe (eg. CN=Paddy O'Brien,OU=Students,DC=etc...), no other members will ever be unenrolled via LDAP.
In enrol/ldap/enrol.php, this is due to the array $ldapmembers not accounting for apostrophes and therefore get_records_sql($sql) fails to return any members due to the resultant syntax error.
It doesn't just affect the name with an apostrophe - it affects any members of the same course.
We fixed by replacing the following code around line 264 (v1.8.2)
$sql .= 'AND usr.idnumber NOT IN (\''. join('\',\'', $ldapmembers).'\')';
with...
$sql .= 'AND usr.idnumber NOT IN (\''. join('\',\'', str_replace("'", "\'",$ldapmembers)).'\')';
|
|
Description
|
If any member of a course has an ID number containing an apostrophe (eg. CN=Paddy O'Brien,OU=Students,DC=etc...), no other members will ever be unenrolled via LDAP.
In enrol/ldap/enrol.php, this is due to the array $ldapmembers not accounting for apostrophes and therefore get_records_sql($sql) fails to return any members due to the resultant syntax error.
It doesn't just affect the name with an apostrophe - it affects any members of the same course.
We fixed by replacing the following code around line 264 (v1.8.2)
$sql .= 'AND usr.idnumber NOT IN (\''. join('\',\'', $ldapmembers).'\')';
with...
$sql .= 'AND usr.idnumber NOT IN (\''. join('\',\'', str_replace("'", "\'",$ldapmembers)).'\')'; |
Show » |
made changes - 30/May/08 09:42 AM
| Field |
Original Value |
New Value |
|
Affects Version/s
|
|
1.9
[ 10190
]
|
made changes - 01/Jun/08 08:54 PM
|
Assignee
|
Nobody
[ nobody
]
|
Iñaki Arenaza
[ iarenaza
]
|
made changes - 03/Jun/08 06:41 AM
|
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
made changes - 10/Jun/08 04:45 PM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
In Progress
[ 3
]
|
Resolved
[ 5
]
|
made changes - 10/Jun/08 04:46 PM
|
Status
|
Resolved
[ 5
]
|
Reopened
[ 4
]
|
|
Resolution
|
Fixed
[ 1
]
|
|
made changes - 10/Jun/08 11:15 PM
|
Fix Version/s
|
|
1.8.6
[ 10270
]
|
|
Fix Version/s
|
|
1.9.2
[ 10280
]
|
made changes - 14/Jun/08 08:37 PM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Reopened
[ 4
]
|
Resolved
[ 5
]
|
|