Skip to content

Commit

Permalink
Fix code scanning alert no. 3: Log Injection
Browse files Browse the repository at this point in the history
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
shulng and github-advanced-security[bot] committed Sep 28, 2024
1 parent d1ccc17 commit 1dd7e2b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ private static void handleKeepLoggedInRequest(String playerName, String time, St
player.updateInventory();
}
} else {
CatSeedLogin.instance.getLogger().warning("玩家 " + playerName + " 未找到在缓存中。");
String sanitizedPlayerName = playerName.replace("\n", "").replace("\r", "");
CatSeedLogin.instance.getLogger().warning("玩家 " + sanitizedPlayerName + " 未找到在缓存中。");
}
});
}
Expand Down

0 comments on commit 1dd7e2b

Please sign in to comment.