File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
tests/acceptance/features/apiUserLDAP Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ public function loginName2UserName($param) {
192192 throw new \Exception ('key uid is expected to be set in $param ' );
193193 }
194194
195+ if (isset ($ param ['hasBeenHandled ' ]) && $ param ['hasBeenHandled ' ]) {
196+ // if the event has been handled already, ignore it
197+ return ;
198+ }
199+
195200 $ configPrefixes = $ this ->getServerConfigurationPrefixes (true );
196201 $ ldapWrapper = new LDAP ();
197202 $ ocConfig = \OC ::$ server ->getConfig ();
@@ -204,6 +209,7 @@ public function loginName2UserName($param) {
204209 $ uid = $ userBackend ->loginName2UserName ($ param ['uid ' ]);
205210 if ($ uid !== false ) {
206211 $ param ['uid ' ] = $ uid ;
212+ $ param ['hasBeenHandled ' ] = true ; // mark the event as handled
207213 }
208214 }
209215
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ Feature: connect to LDAP serer
4949 Given LDAP config "LDAPTestId" has key "ldapHost" set to "http://%ldap_host_without_scheme%"
5050 When user "Alice" requests "/index.php/apps/files" with "GET" using basic auth
5151 Then the HTTP status code should be "401"
52- And the last lines of the log file should contain log-entries containing these attributes:
53- | app | message |
54- | PHP | ldap_connect (): Could not create session handle : Bad parameter to an ldap routine at |
55- | PHP | ldap_set_option (): supplied argument is not a valid ldap link resource at |
5652
5753 @issue-49
5854 Scenario : authentication works when second of multiple configurations has an unreachable host configured
You can’t perform that action at this time.
0 commit comments