From 7b372db5593ddc92dd442e57170f13072b43ade8 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 23 Feb 2026 20:59:46 +0100 Subject: DiscIO: Only allow alphanumeric ASCII in game IDs We often use game IDs in paths, so we should try to make sure path traversal is impossible in game IDs. Admittedly, doing any kind of real attack using the six bytes available in game IDs is unrealistic, but no game ID should contain non-alphanumeric or non-ASCII characters anyway. Might also fix https://bugs.dolphin-emu.org/issues/13982 by skipping converting between encodings for game IDs. --- Source/Core/DiscIO/VolumeWad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DiscIO/VolumeWad.cpp') diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index ff98b55791..44e229e1ce 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -247,7 +247,7 @@ std::string VolumeWAD::GetMakerID(const Partition& partition) const if (!Common::IsPrintableCharacter(temp[0]) || !Common::IsPrintableCharacter(temp[1])) return "00"; - return DecodeString(temp); + return FilterGameID(temp); } std::optional VolumeWAD::GetTitleID(const Partition& partition) const -- cgit v1.2.3