@@ -125,7 +125,7 @@ class Connection extends LDAPUtility {
125125 protected $ ignoreValidation = false ;
126126
127127 /**
128- * @var array{dn?: mixed, hash ?: string, result?: bool}
128+ * @var array{sum ?: string, result?: bool}
129129 */
130130 protected $ bindResult = [];
131131
@@ -669,11 +669,7 @@ public function bind() {
669669
670670 if (
671671 count ($ this ->bindResult ) !== 0
672- && $ this ->bindResult ['dn ' ] === $ this ->configuration ->ldapAgentName
673- && \OC ::$ server ->getHasher ()->verify (
674- $ this ->configPrefix . $ this ->configuration ->ldapAgentPassword ,
675- $ this ->bindResult ['hash ' ]
676- )
672+ && $ this ->bindResult ['sum ' ] === md5 ($ this ->configuration ->ldapAgentName . $ this ->configPrefix . $ this ->configuration ->ldapAgentPassword )
677673 ) {
678674 // don't attempt to bind again with the same data as before
679675 // bind might have been invoked via getConnectionResource(),
@@ -686,8 +682,7 @@ public function bind() {
686682 $ this ->configuration ->ldapAgentPassword );
687683
688684 $ this ->bindResult = [
689- 'dn ' => $ this ->configuration ->ldapAgentName ,
690- 'hash ' => \OC ::$ server ->getHasher ()->hash ($ this ->configPrefix . $ this ->configuration ->ldapAgentPassword ),
685+ 'sum ' => md5 ($ this ->configuration ->ldapAgentName . $ this ->configPrefix . $ this ->configuration ->ldapAgentPassword ),
691686 'result ' => $ ldapLogin ,
692687 ];
693688
0 commit comments