Skip to content

Commit

Permalink
WA-5824: Workaround a bug in WA where anchor was sent as part of the URL
Browse files Browse the repository at this point in the history
  • Loading branch information
ctalau committed Jul 27, 2022
1 parent 96dca34 commit 3034184
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.oxygenxml.cmis.core.urlhandler.CmisURLConnection;

import lombok.extern.slf4j.Slf4j;
import ro.sync.basic.util.URLUtil;
import ro.sync.ecss.extensions.api.webapp.WebappMessage;
import ro.sync.ecss.extensions.api.webapp.plugin.URLStreamHandlerWithContext;
import ro.sync.ecss.extensions.api.webapp.plugin.UserActionRequiredException;
Expand All @@ -22,6 +23,10 @@ public class CmisStreamHandler extends URLStreamHandlerWithContext {

@Override
protected URLConnection openConnectionInContext(String contextId, URL url, Proxy proxy) throws IOException {
// WA-5824: The URL should not contain anchor anyway, but we strip it so that some users can
// use the updated plugin before the fix landed in WA.
url = URLUtil.removeAnchor(url);

// Getting credentials and another information
UserCredentials credentials = CredentialsManager.INSTANCE.getCredentials(contextId);
CMISAccess cmisAccess = new CMISAccess();
Expand Down

0 comments on commit 3034184

Please sign in to comment.