瀏覽代碼

Fix introduced compile error

Ian Wright 8 年之前
父節點
當前提交
3699163b3e
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/main/java/password/pwm/util/CASFilterAuthenticationProvider.java

+ 8 - 8
src/main/java/password/pwm/util/CASFilterAuthenticationProvider.java

@@ -214,6 +214,14 @@ public class CASFilterAuthenticationProvider implements PwmHttpFilterAuthenticat
                 final byte[] cred64 = StringUtil.base64Decode(encodedPsw);
                 final byte[] cred64 = StringUtil.base64Decode(encodedPsw);
                 cipher.init(Cipher.DECRYPT_MODE, privateKey);
                 cipher.init(Cipher.DECRYPT_MODE, privateKey);
                 final byte[] cipherData = cipher.doFinal(cred64);
                 final byte[] cipherData = cipher.doFinal(cred64);
+                if (cipherData != null) {
+                    try {
+                        password = new PasswordData(new String(cipherData));
+                    } catch (PwmUnrecoverableException e) {
+                        LOGGER.error("Decryption failed", e);
+                        return password;
+                    }
+                }
             } catch (NoSuchAlgorithmException e1) {
             } catch (NoSuchAlgorithmException e1) {
                 LOGGER.error("Decryption failed", e1);
                 LOGGER.error("Decryption failed", e1);
                 return password;
                 return password;
@@ -236,14 +244,6 @@ public class CASFilterAuthenticationProvider implements PwmHttpFilterAuthenticat
                 LOGGER.error("Decryption failed", e);
                 LOGGER.error("Decryption failed", e);
                 return password;
                 return password;
             }
             }
-            if (cipherData != null) {
-                try {
-                    password = new PasswordData(new String(cipherData));
-                } catch (PwmUnrecoverableException e) {
-                    LOGGER.error("Decryption failed", e);
-                    return password;
-                }
-            }
         }
         }
         return password;
         return password;
     }
     }