xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.
https://extensions.typo3.org/extension/ig_ldap_sso_auth
27 stars 68 forks source link

ADS User Import fails for special cases #31

Closed wwrzv closed 4 years ago

wwrzv commented 6 years ago

We use Typo3 7.6.x / ig_ldap_sso_auth 3.3.0 / Windows 2012 / ADS. Everything works fine, but importing/updating users with format 'Lastname, Firstname' doesn't work (no error-message), e.g. cn=Mustermann, Max / distinguishedName: CN=Mustermann\, Max,OU= ....

When there is no comma in cn / distinguishedName import/update works fine.

xperseguers commented 6 years ago

Must be related to this ticket in the old repository: https://forge.typo3.org/issues/77865

mira1980 commented 5 years ago

We use Typo3 8.7.26 / ig_ldap_sso_auth 3.3.1 and keep running into the same issue.

Has there been any progress on this matter? Unfortunately, the link posted by @xperseguers doesn't go anywhere.

Problem is the same as described above:

wwrzv commented 5 years ago

We are using two hotfixes from https://forge.typo3.org/issues/77865 for ig_ldap_sso_auth versions up to 3.3.1 in production with Typo3 versions up to 8.7.26. Import/update works for the described import failure.

1. typo3conf\ext\ig_ldap_sso_auth\Classes\Controller -> ~line 344

    if ($success) {
        list($filter, $baseDn) = Authentication::getRelativeDistinguishedNames($dn, 2);
        # HOTFIX START
        if (preg_match('/CN=.*/',$filter)) {
            $filter = preg_replace('/\\\\,/',',',$filter);
        }
        # HOTFIX ENDE

        $ldapUser = $this->ldap->search($baseDn, '(' . $filter . ')', [], true);
        $typo3Users = $importUtility->fetchTypo3Users([$ldapUser]);

2. typo3conf\ext\ig_ldap_sso_auth\Resources\Public\JavaScript\import.js -> ~ line 44

    IgLdapSsoAuthImport.fields.form.submit(function (e) {
        e.preventDefault(); // this will prevent from submitting the form
                //var dn = $('#tx-igldapssoauth-dn').val();
        // Hotfix https://forge.typo3.org/issues/77865   #13
        var dn = $('#tx-igldapssoauth-dn').val().replace(/\\/g, '\\\\');
        IgLdapSsoAuthImport.ldapImport($("button[value='" + dn + "']").closest('tr'));
    });
xperseguers commented 4 years ago

Now fixed