Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan E. Cook2017-01-27 14:16:31 -0500
committerMorgan Cook2017-02-14 15:36:16 -0500
commit8bb82d54d129b56036c90b5111845369b2b76ec0 (patch)
treeea3505fce885879a8bc18416c54536e9d0c770a4
parentaa721b5bc36fd4e107e36345aaba9885a251d9b3 (diff)
downloadorg.eclipse.osee-8bb82d54d129b56036c90b5111845369b2b76ec0.tar.gz
org.eclipse.osee-8bb82d54d129b56036c90b5111845369b2b76ec0.tar.xz
org.eclipse.osee-8bb82d54d129b56036c90b5111845369b2b76ec0.zip
bug: Fix support for URL encoding in REST calls
Change-Id: Ifc32dd0332510b52dd1004138f4443d3e52f1c0f Signed-off-by: Morgan E. Cook <Morgan.e.cook@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogRequestFilter.java2
-rw-r--r--plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java8
-rw-r--r--plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2RequestFilter.java2
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogRequestFilter.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogRequestFilter.java
index 24391dd9b31..54d41c0213d 100644
--- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogRequestFilter.java
+++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogRequestFilter.java
@@ -48,7 +48,7 @@ public class ActivityLogRequestFilter implements ContainerRequestFilter {
public void filter(ContainerRequestContext context) {
if (activityLog.isEnabled()) {
try {
- String message = String.format("%s %s", context.getMethod(), context.getUriInfo().getRequestUri());
+ String message = String.format("%s %s", context.getMethod(), context.getUriInfo().getPath());
Long serverId = getServerId(context);
Long clientId = ActivityConstants.DEFAULT_CLIENT_ID;
if (Strings.isNumeric(context.getHeaders().getFirst("osee.client.id"))) {
diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java
index ae758eaad08..3ddc8b585d9 100644
--- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java
+++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java
@@ -114,7 +114,7 @@ public final class JaxRsResourceManager implements BundleListener {
public Resource findResource(ContainerRequestContext requestContext) {
UriInfo uriInfo = requestContext.getUriInfo();
- String path = uriInfo.getAbsolutePath().getPath();
+ String path = uriInfo.getPath(false);
Resource resource = getResource(path);
if (resource == null) {
@@ -204,9 +204,9 @@ public final class JaxRsResourceManager implements BundleListener {
boolean isActive = false;
boolean isStopping = false;
if (state == Bundle.ACTIVE //
- || state == Bundle.STARTING //
- || state == Bundle.INSTALLED //
- || state == Bundle.RESOLVED) {
+ || state == Bundle.STARTING //
+ || state == Bundle.INSTALLED //
+ || state == Bundle.RESOLVED) {
isActive = true;
} else if (state == Bundle.STOPPING) {
isStopping = true;
diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2RequestFilter.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2RequestFilter.java
index db25a0c72a5..aac8a792f88 100644
--- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2RequestFilter.java
+++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2RequestFilter.java
@@ -92,7 +92,7 @@ public class OAuth2RequestFilter extends OAuthRequestFilter {
public void filter(ContainerRequestContext context) {
boolean isSecurePath = isPathSecure(context);
UriInfo uriInfo = context.getUriInfo();
- String path = uriInfo.getAbsolutePath().getPath();
+ String path = uriInfo.getPath();
if (isSecurePath && path.contains("oauth2") || path.contains("accounts/self")) {
if (isResourceOwnerRequest(context)) {
handleResourceOwnerRequest(context);

Back to the top