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 62 forks source link

301c659 breaks 11LTS-compatibility due to wrong group table lookup #183

Closed jpmschuler closed 8 months ago

jpmschuler commented 9 months ago

With dev-master I had the problem that although group sync was disabled and keep be groups was enabled, my users be_groups were manipulated (not all groups retained, only some). Found out that the SQL query for checking the groups referred to the wrong table: https://github.com/xperseguers/t3ext-ig_ldap_sso_auth/blob/785ade1b309d91e0a159ecea827c959e721fc69e/Classes/Domain/Repository/Typo3UserRepository.php#L376 creates an SQL query referring to the wrong table. Called by https://github.com/xperseguers/t3ext-ig_ldap_sso_auth/blob/785ade1b309d91e0a159ecea827c959e721fc69e/Classes/Library/Authentication.php#L257

However the table here was fe_groups, thus the chaos. So somehow the new implementation of https://github.com/xperseguers/t3ext-ig_ldap_sso_auth/blob/785ade1b309d91e0a159ecea827c959e721fc69e/Classes/Library/Authentication.php#L917-L928 is not correct for 11LTS

333c92f is the version before that, which works fine in that regard - and not deep enough in 12LTS to provide a fix, but thought to at least mention the bug

pitscribble commented 8 months ago

I had the same problem with dev-master in TYPO3 v11.5, but was not able to find the reason, but what you write seems reasonable. For me groups keep getting deleted form be_users even tho i have disabled group syncing and with 3.7.1 this was not a problem.

chrosey commented 8 months ago

having the same issue with TYPO3 11.5 in my case Library/Authentication.php has neither static::$authenticationService or $GLOBALS['TYPO3_REQUEST'] available. Then it assumes fe_groups is the right table.

My Workaround for TYPO3 11 is this patch:

diff --git a/Classes/Utility/CompatUtility.php b/Classes/Utility/CompatUtility.php
--- a/Classes/Utility/CompatUtility.php 
+++ b/Classes/Utility/CompatUtility.php (date 1688549974000)
@@ -33,6 +33,7 @@
                     ? 'FE'
                     : 'BE';
             }
+            if (defined('TYPO3_MODE')) return TYPO3_MODE;
             // Hopefully TYPO3 v12 will always provide a valid TYPO3_REQUEST, and we
             // won't have to have some magic in the calling method
             return null;