Avoid that a user can recover an expirated SAML session with a different userid than...
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileUploader.java
index 0d0d538..4863840 100644 (file)
@@ -794,7 +794,8 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
             String content = null;
             
             boolean needsToUpdateCredentials = (uploadResult.getCode() == ResultCode.UNAUTHORIZED ||
-                    (uploadResult.isTemporalRedirection() && AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mUploadClient.getAuthTokenType())));
+                    ((uploadResult.isTemporalRedirection() || uploadResult.isIdPRedirection())
+                            && AccountAuthenticator.AUTH_TOKEN_TYPE_SAML_WEB_SSO_SESSION_COOKIE.equals(mUploadClient.getAuthTokenType())));
             if (needsToUpdateCredentials) {
                 // let the user update credentials with one click
                 Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);