cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing a typo
Date Thu, 20 Apr 2017 15:58:00 GMT
Repository: cxf
Updated Branches:
  refs/heads/master cbb8261fc -> 9a19f69aa


Fixing a typo


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

Branch: refs/heads/master
Commit: 9a19f69aab463eae96eaf0e5beba877da84d857d
Parents: cbb8261
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Apr 20 16:57:45 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Apr 20 16:57:45 2017 +0100

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/filters/OAuthRequestFilter.java       | 2 +-
 .../java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9a19f69a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index a485c1e..ec1e8fa 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -162,7 +162,7 @@ public class OAuthRequestFilter extends AbstractAccessTokenValidator
         if (certThumbprint != null) {
             TLSSessionInfo tlsInfo = getTlsSessionInfo();
             X509Certificate cert = tlsInfo == null ? null : OAuthUtils.getRootTLSCertificate(tlsInfo);
-            if (!OAuthUtils.compareCertificateThumbprints(cert, certThumbprint)) { 
+            if (cert == null || !OAuthUtils.compareCertificateThumbprints(cert, certThumbprint))
{ 
                 throw ExceptionUtils.toForbiddenException(null, null);
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9a19f69a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index 6e38944..06bf7de 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -92,8 +92,8 @@ public final class OAuthUtils {
     public static boolean compareCertificateThumbprints(X509Certificate cert, String encodedThumbprint)
{
         try {
             byte[] thumbprint = createCertificateThumbprint(cert);
-            byte[] currentThumbrint = Base64UrlUtility.decode(encodedThumbprint);
-            return MessageDigest.isEqual(thumbprint, currentThumbrint);
+            byte[] currentThumbprint = Base64UrlUtility.decode(encodedThumbprint);
+            return MessageDigest.isEqual(thumbprint, currentThumbprint);
         } catch (Exception ex) {
             return false;
         }


Mime
View raw message