cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Yet another update to ClientCodeRequestFilter
Date Tue, 19 Jul 2016 18:12:03 GMT
Repository: cxf
Updated Branches:
  refs/heads/master bf3b463d2 -> f376b314e


Yet another update to ClientCodeRequestFilter


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f376b314
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f376b314
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f376b314

Branch: refs/heads/master
Commit: f376b314ea96b60043efab17397ca39fcf540de3
Parents: bf3b463
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Jul 19 21:11:15 2016 +0300
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Jul 19 21:11:15 2016 +0300

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f376b314/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
index b7a0c01..dfd1826 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/client/ClientCodeRequestFilter.java
@@ -124,8 +124,7 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter
{
     protected boolean isStartUriMatched(UriInfo ui, String absoluteRequestUri, boolean sameRedirectUri)
{
         // If all request URIs can initiate a code flow then it is a match 
         // unless the current request URI matches a non-null completeUri 
-        if (startUri == null 
-            && (completeUri != null && !absoluteRequestUri.endsWith(completeUri)
|| !sameRedirectUri)) {
+        if (startUri == null && completeUri != null && !absoluteRequestUri.endsWith(completeUri))
{
             return true;
         }
         // If completeUri is null or startUri equals to it then check the code flow
@@ -137,7 +136,8 @@ public class ClientCodeRequestFilter implements ContainerRequestFilter
{
             }
         }
         // Finally compare start URI with the request URI
-        return startUri != null && absoluteRequestUri.endsWith(startUri);
+        return startUri == null && !sameRedirectUri 
+            || startUri != null && absoluteRequestUri.endsWith(startUri);
     }
 
     private boolean codeResponseQueryParamsAvailable(MultivaluedMap<String, String>
queries) {


Mime
View raw message