Skip to content

Commit

Permalink
Fix code scanning alert no. 2: 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 0131312 commit d1ccc17
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ private static void handleRequest(Socket socket) {
handleKeepLoggedInRequest(playerName, time, sign);
break;
default:
CatSeedLogin.instance.getLogger().warning("未知请求类型: " + requestType);
String sanitizedRequestType = requestType.replace("\n", "").replace("\r", "");
CatSeedLogin.instance.getLogger().warning("未知请求类型: " + sanitizedRequestType);
break;
}
} catch (IOException e) {
Expand Down

0 comments on commit d1ccc17

Please sign in to comment.