Repository: shiro
Updated Branches:
  refs/heads/master 63f2891d4 -> 6e152b105


Improved log message and level when AbstractRememberMeManager fails to parse.


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

Branch: refs/heads/master
Commit: 6e152b1053b8ab1c97442ae41b298d998ed7b791
Parents: 63f2891
Author: Brian Demers <[email protected]>
Authored: Fri Aug 19 11:51:01 2016 -0400
Committer: Brian Demers <[email protected]>
Committed: Fri Aug 19 11:59:34 2016 -0400

----------------------------------------------------------------------
 .../apache/shiro/mgt/AbstractRememberMeManager.java    | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/shiro/blob/6e152b10/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java 
b/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
index c857ef9..4d15abe 100644
--- a/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/AbstractRememberMeManager.java
@@ -423,7 +423,7 @@ public abstract class AbstractRememberMeManager implements 
RememberMeManager {
 
     /**
      * Called when an exception is thrown while trying to retrieve principals. 
 The default implementation logs a
-     * debug message and forgets ('unremembers') the problem identity by 
calling
+     * warning message and forgets ('unremembers') the problem identity by 
calling
      * {@link #forgetIdentity(SubjectContext) forgetIdentity(context)} and 
then immediately re-throws the
      * exception to allow the calling component to react accordingly.
      * <p/>
@@ -439,11 +439,14 @@ public abstract class AbstractRememberMeManager 
implements RememberMeManager {
      * @return nothing - the original {@code RuntimeException} is propagated 
in all cases.
      */
     protected PrincipalCollection 
onRememberedPrincipalFailure(RuntimeException e, SubjectContext context) {
-        if (log.isDebugEnabled()) {
-            log.debug("There was a failure while trying to retrieve remembered 
principals.  This could be due to a " +
+
+        if (log.isWarnEnabled()) {
+            String message = "There was a failure while trying to retrieve 
remembered principals.  This could be due to a " +
                     "configuration problem or corrupted principals.  This 
could also be due to a recently " +
-                    "changed encryption key.  The remembered identity will be 
forgotten and not used for this " +
-                    "request.", e);
+                    "changed encryption key, if you are using a shiro.ini 
file, this property would be " +
+                    "'securityManager.rememberMeManager.cipherKey' see: 
http://shiro.apache.org/web.html#Web-RememberMeServices. " +
+                    "The remembered identity will be forgotten and not used 
for this request.";
+            log.warn(message);
         }
         forgetIdentity(context);
         //propagate - security manager implementation will handle and warn 
appropriately

Reply via email to