mirror of https://github.com/apache/cloudstack.git
Bug 12639: while logging events, hide value for configs containing password string in config name
Status 12639: resolved fixed Reviewed-By: Nitin
This commit is contained in:
parent
68ace71ca8
commit
6aaac81ca2
|
|
@ -397,7 +397,8 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
Long userId = UserContext.current().getCallerUserId();
|
||||
String name = cmd.getCfgName();
|
||||
String value = cmd.getValue();
|
||||
UserContext.current().setEventDetails(" Name: "+name +" New Value: "+((value == null) ? "" : value));
|
||||
UserContext.current().setEventDetails(" Name: "+name +" New Value: "+ (((name.toLowerCase()).contains("password")) ? "*****" :
|
||||
(((value == null) ? "" : value))));
|
||||
// check if config value exists
|
||||
if (_configDao.findByName(name) == null) {
|
||||
throw new InvalidParameterValueException("Config parameter with name " + name + " doesn't exist");
|
||||
|
|
|
|||
Loading…
Reference in New Issue