File tree 2 files changed +6
-4
lines changed
tests/acceptance/features/apiUserLDAP
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) {
192
192
throw new \Exception ('key uid is expected to be set in $param ' );
193
193
}
194
194
195
+ if (isset ($ param ['hasBeenHandled ' ]) && $ param ['hasBeenHandled ' ]) {
196
+ // if the event has been handled already, ignore it
197
+ return ;
198
+ }
199
+
195
200
$ configPrefixes = $ this ->getServerConfigurationPrefixes (true );
196
201
$ ldapWrapper = new LDAP ();
197
202
$ ocConfig = \OC ::$ server ->getConfig ();
@@ -204,6 +209,7 @@ public function loginName2UserName($param) {
204
209
$ uid = $ userBackend ->loginName2UserName ($ param ['uid ' ]);
205
210
if ($ uid !== false ) {
206
211
$ param ['uid ' ] = $ uid ;
212
+ $ param ['hasBeenHandled ' ] = true ; // mark the event as handled
207
213
}
208
214
}
209
215
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ Feature: connect to LDAP serer
49
49
Given LDAP config "LDAPTestId" has key "ldapHost" set to "http://%ldap_host_without_scheme%"
50
50
When user "Alice" requests "/index.php/apps/files" with "GET" using basic auth
51
51
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 |
56
52
57
53
@issue-49
58
54
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