Can you advice how to change code ActiveDirectoryExtra.php to get it working ? And does other files need changing because of this modification?
$adGroupId variable is currently expected to be integer but it's not when using Active Directory
Expected behaviour
Return AD groups
Actual behaviour
No results
Server configuration
Operating system: Windows NT 10.0 build 20348 (Windows Server 2022) AMD64
With my modifications to ActiveDirectoryExtra.php now database table teampass_ldap_groups_roles has the correct objectGUID formatting
Which other files I need to modify ?
Page on which it happened
index.php?page=roles
Steps to reproduce
At least in our active directory objectGUID type is octet string (not integer) Example guid![image](https://github.com/nilsteampassnet/TeamPass/assets/143798490/3aec8803-7985-47f6-8abe-d0485cceebe9)
Using this function I can return it as string public function objectGuidToUuidString(string $objectGuid): string { $unpacked = array_map('dechex', unpack('V_a/v2_b/n4_c', $objectGuid)); $unpacked['_a'] = str_pad($unpacked['_a'], 8, '0', STR_PAD_LEFT); $unpacked['_b1'] = str_pad($unpacked['_b1'], 4, '0', STR_PAD_LEFT); $unpacked['_b2'] = str_pad($unpacked['_b2'], 4, '0', STR_PAD_LEFT); $unpacked['_c1'] = str_pad($unpacked['_c1'], 4, '0', STR_PAD_LEFT); $unpacked['_c2'] = str_pad($unpacked['_c2'], 4, '0', STR_PAD_LEFT); $unpacked['_c3'] = str_pad($unpacked['_c3'], 4, '0', STR_PAD_LEFT); $unpacked['_c4'] = str_pad($unpacked['_c4'], 4, '0', STR_PAD_LEFT); return "{$unpacked['_a']}-{$unpacked['_b1']}-{$unpacked['_b2']}-{$unpacked['_c1']}-{$unpacked['_c2']}{$unpacked['_c3']}{$unpacked['_c4']}"; }
$adGroupId = $this->objectGuidToUuidString($group[$settings['ldap_guid_attibute']][0]); echo $adGroupId; // returns "123dec82-0f05-4750-a2b4-a32950072495"
Can you advice how to change code ActiveDirectoryExtra.php to get it working ? And does other files need changing because of this modification? $adGroupId variable is currently expected to be integer but it's not when using Active Directory
Expected behaviour
Return AD groups
Actual behaviour
No results
Server configuration
Operating system: Windows NT 10.0 build 20348 (Windows Server 2022) AMD64
Web server: Apache/2.4.59 (Win64) PHP/8.3.7
Database: 8.4.0
PHP version: 8.3.7
Teampass version: 3.1.2
Teampass configuration file:
Updated from an older Teampass or fresh install: Fresh Install
Client configuration
Browser: -
Operating system: - bits
Logs
Web server error log
Teampass 10 last system errors
Log from the web-browser developer console (CTRL + SHIFT + i)