mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
OC-1028: add extra condition to check of redirection. New method isIdPRedirection at RemoteOperationResult
This commit is contained in:
parent
b458c92be0
commit
9724afda5d
2 changed files with 6 additions and 2 deletions
|
@ -744,7 +744,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
|
|||
// NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens
|
||||
}
|
||||
|
||||
if (result.isTemporalRedirection()) {
|
||||
if (result.isTemporalRedirection() || result.isIdPRedirection()) {
|
||||
String url = result.getRedirectedLocation();
|
||||
String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType);
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ import java.net.MalformedURLException;
|
|||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.net.ssl.SSLException;
|
||||
|
||||
|
@ -319,5 +318,10 @@ public class RemoteOperationResult implements Serializable {
|
|||
public String getRedirectedLocation() {
|
||||
return mRedirectedLocation;
|
||||
}
|
||||
|
||||
public boolean isIdPRedirection() {
|
||||
return (mRedirectedLocation.toUpperCase().contains("SAML") ||
|
||||
mRedirectedLocation.toLowerCase().contains("wayf"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue