#1474 Don't log /email changepassword command (exposes password)

This commit is contained in:
ljacqu 2018-01-21 19:06:51 +01:00
parent 761ee2f05b
commit 847991b658
2 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ final class LogFilterHelper {
static final List<String> COMMANDS_TO_SKIP = withAndWithoutAuthMePrefix(
"/login ", "/l ", "/log ", "/register ", "/reg ", "/unregister ", "/unreg ",
"/changepassword ", "/cp ", "/changepass ", "/authme register ", "/authme reg ", "/authme r ",
"/authme changepassword ", "/authme password ", "/authme changepass ", "/authme cp ");
"/authme changepassword ", "/authme password ", "/authme changepass ", "/authme cp ", "/email setpassword ");
private static final String ISSUED_COMMAND_TEXT = "issued server command:";

View File

@ -28,7 +28,8 @@ public class LogFilterHelperTest {
// given
List<CommandDescription> sensitiveCommands = Arrays.asList(
getCommand("register"), getCommand("login"), getCommand("changepassword"), getCommand("unregister"),
getCommand("authme", "register"), getCommand("authme", "changepassword")
getCommand("authme", "register"), getCommand("authme", "changepassword"),
getCommand("email", "setpassword")
);
// Build array with entries like "/register ", "/authme cp ", "/authme changepass "
String[] expectedEntries = sensitiveCommands.stream()