Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.4.11, 3.4.13
Description
n methods of org.apache.zookeeper.test.system.GenerateLoad,
public static void main(String[] args) throws InterruptedException,
KeeperException, NoAvailableContainers, DuplicateNameException,
NoAssignmentException {
......
if (!statusWatcher.waitConnected(5000))
......
String mode = getMode(parts[i]);
if (mode.equals("leader"))
try
{ String cmdNumber[] = line.split(" "); ...... }catch (NumberFormatException e)
{ System.out.println("Not a valid number: " + e.getMessage()); } ......
}
}
Sensitive data about args[0], zkHostPort, and cmdNumber are directly printed and may leak.
For security, log should be used to record these data, as well as log in other classes such as org.apache.zookeeper.server.ZooKeeperServer:
LOG = LoggerFactory.getLogger(GenerateLoad.class);
......
LOG.error("Could not connect to " + args[0]);
......
LOG.info("Connecting exclusively to " + zkHostPort.toString());
......
LOG.error("Not a valid number: " + e.getMessage());
Attachments
Issue Links
- links to