mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged 5.1-MC1 (5.1.0) to HEAD (5.1)
119073 adavis: Merged 5.1.N (5.1.1) to 5.1-MC1 (5.1.0) 117356 adavis: Merged 5.0.2-CLOUD42 (Cloud ) to 5.1.N (5.1.1) 117263 adavis: Merged 5.0.2-CLOUD (Cloud ) to 5.0.2-CLOUD42 (Cloud ) 114898 gjames: BCRYPT MNT-14892 RA-609, better logging messages and added OnStartup validation git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@119912 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -112,8 +112,12 @@ public class CompositePasswordEncoder
|
||||
//The unsafe encoder is used at the end so that's ok.
|
||||
return true;
|
||||
}
|
||||
logger.warn("Unsafe encoders in the encoding chain: "+Arrays.toString(unsafeEncoders.toArray())
|
||||
+". Only 1 unsafe encoder is allowed at the end of the chain: "+Arrays.toString(encodingChain.toArray()));
|
||||
//, because there is already an unupgradable encoder at the end of the chain.
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Non-upgradable encoders in the encoding chain: "+Arrays.toString(unsafeEncoders.toArray())
|
||||
+". Only 1 non-upgradable encoder is allowed at the end of the chain: "+Arrays.toString(encodingChain.toArray()));
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -128,6 +132,8 @@ public class CompositePasswordEncoder
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Preferred password encoding set to "+preferredEncoding);
|
||||
}
|
||||
if (!encoders.containsKey(preferredEncoding)) throw new AlfrescoRuntimeException("Invalid preferredEncoding specified: "
|
||||
+preferredEncoding+ ". Permissible encoders are "+encoders.keySet());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -303,7 +303,8 @@ public class UpgradePasswordHashWorker implements ApplicationContextAware, Initi
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("Unsafe to Double Hash user: " + username + "'. The user needs to login first.");
|
||||
logger.warn("Unable to upgrade password hash for user '" + username
|
||||
+ "', please ask them to login.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -494,7 +495,7 @@ public class UpgradePasswordHashWorker implements ApplicationContextAware, Initi
|
||||
}
|
||||
else if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("User '" + username + "' has preferred encoding");
|
||||
logger.trace("Encoding for user '" + username + "' was not changed.");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Reference in New Issue
Block a user