LDAP support for non-standard port LDAP Urls
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Unassigned | ||
1.5 |
Fix Released
|
Medium
|
Unassigned | ||
1.6 |
Fix Released
|
Medium
|
Unassigned | ||
1.7 |
Fix Released
|
Medium
|
Unassigned | ||
1.8 |
Fix Released
|
Medium
|
John Kelsh |
Bug Description
This came up from a user asking for help on IRC. They had upgraded their site from Mahara 1.4 to Mahara 1.5 and found that LDAP authentication stopped working. Their LDAP "host URL" field was in this format: ldap://
In Mahara 1.4, this string would be passed in as the first and only parameter to ldap_connect().
In Mahara 1.5, the code is "smarter" and notices the final colon before the port number 3268. It strips this off of the URL, and passes "ldap:/
The problem is, if the first parameter to ldap-connect is in "URL style" starting with a protocol ldap:// or ldaps://, ldap_connect() IGNORES the second parameter. And so the port was stripped off, and then ignored, and the connection didn't work.
Making matters worse, the documentation tells people to put a protocol header on the front of their "Host URL".
tags: | added: nominatedfeature |
Changed in mahara: | |
status: | Confirmed → Fix Committed |
Changed in mahara: | |
milestone: | 1.5.12 → 1.8.0 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Possible solution attached.