Skip to content

Commit fb9f779

Browse files
committed
Fixed detection of authentication method in server with permanent redirection
1 parent b6d9c26 commit fb9f779

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ protected RemoteOperationResult run(OwnCloudClient client) {
9595

9696
// try to access the root folder, following redirections but not SAML SSO redirections
9797
result = operation.execute(client);
98-
while (result.isTemporalRedirection() && !result.isIdPRedirection()) {
98+
String redirectedLocation = result.getRedirectedLocation();
99+
while (redirectedLocation != null && redirectedLocation.length() > 0 && !result.isIdPRedirection()) {
99100
client.setWebdavUri(Uri.parse(result.getRedirectedLocation()));
100101
result = operation.execute(client);
102+
redirectedLocation = result.getRedirectedLocation();
101103
}
102104

103105
// analyze response

0 commit comments

Comments
 (0)