•  
      request #14110 LDAP authentication fails when providing a list of LDAP servers
    Infos
    #14110
    Michel Cramatte (mcramatte)
    2019-11-21 14:56
    2019-11-06 11:19
    15304
    Details
    LDAP authentication fails when providing a list of LDAP servers

    Context :

    • This issue has been discovered after an upgrade from Tuleap 9.6 to 11.7
    • Simultaneously, we upgraded PHP from version 5.3.3 to scl PHP 7.3.11
    • OS is CentOS 6.7

    Issue :

    • LDAP authentication fails when providing a list of LDAP servers in sys_ldap_server field.
    • With a single server, issue does not appear: login is successful.

    Error in /var/log/tuleap/ldap_syslog :

    • 2019-11-06T09:56:38+01:00 [23034] [warning] Cannot connect to any LDAP server: xx.xx.xx.xx,yy.yy.yy.yy ***ERROR: ***ERROR no:

    Proposed fix :

    • in /usr/share/tuleap/plugins/ldap/include/LDAP.class.php script
    • line 114
    • we replaced //foreach (explode('[,;]', $this->ldapParams['server']) as $ldap_server) { 
    • by foreach (preg_split('/[,;]/', $this->ldapParams['server']) as $ldap_server) {
    • reason : explode does not support regexp as delimiter.

     

    Authentication & LDAP
    All
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-11-21
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Integrated into Tuleap 11.8.99.74

    • Status changed from Under review to Closed
    • Connected artifacts
    • Close date set to 2019-11-21
    User avatar
    Thomas Gerbet (tgerbet)2019-11-06 11:45
    Hi,

    Thanks for detailed bug report.

    I confirm the issue, issue was introduced by git #tuleap/stable/d355e777e2dad007421bc4412b6d743c61f7a06c (it looks like I successfully have introduced a bug with my first contribution to Tuleap o/).

    That's being said, it's a bit weird that you did not notice the issue before because from what I see it should be present since Tuleap 7.9.

    • Category changed from Site admin to Authentication & LDAP
    • Status changed from New to Verified
    • Assigned to changed from None to Thomas Gerbet (tgerbet)
    • Reported in version changed from 11.6 to All
    • Platform cleared values: CentOS 6