cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Only map principals when both realms are non-null
Date Fri, 12 May 2017 12:24:14 GMT
Repository: cxf
Updated Branches:
  refs/heads/master de11ac7d5 -> a71508214


Only map principals when both realms are non-null


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

Branch: refs/heads/master
Commit: a71508214a7682c6a569075b1395f387c31be63b
Parents: de11ac7
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri May 12 13:23:54 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri May 12 13:24:11 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/sts/operation/AbstractOperation.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a7150821/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
index b38c9eb..69b6316 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
@@ -585,7 +585,7 @@ public abstract class AbstractOperation {
             String targetRealm = providerParameters.getRealm();
             String sourceRealm = tokenResponse.getTokenRealm();
 
-            if (sourceRealm != null && !sourceRealm.equals(targetRealm)) {
+            if (sourceRealm != null && targetRealm != null && !sourceRealm.equals(targetRealm))
{
                 RelationshipResolver relRes = stsProperties.getRelationshipResolver();
                 Relationship relationship = null;
                 if (relRes != null) {
@@ -619,7 +619,7 @@ public abstract class AbstractOperation {
                     // principal remains unchanged
 
                 } else  {
-                    LOG.log(Level.SEVERE, "Unkown federation type: " + relationship.getType());
+                    LOG.log(Level.SEVERE, "Unknown federation type: " + relationship.getType());
                     throw new STSException("Error in providing a token", STSException.BAD_REQUEST);
                 }
             }


Mime
View raw message