From 07677aa5006b45dc511269f2c4b2d055cab679bb Mon Sep 17 00:00:00 2001 From: Dmr77680 Date: Tue, 3 Nov 2026 16:36:49 +0100 Subject: [PATCH] [bcat] Verify delivery cache file names as file names (AI-assisted) (#4625) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. - [x] I have read and followed the [website policy](https://git.eden-emu.dev/eden-emu/site-policy). - [ ] I affirm that the content of this pull request body was written and submitted entirely by me, in my own words, and not by an AI agent or LLM. - [ ] I affirm that I did not read any of this, and understand that my pull request will be closed if I check this box. - [x] I affirm that, by submitting this pull request, I am responsible for all of the changes contained within these commits. ------------------- Problem When opening a file in a BCAT directory, Eden validated the file name using the directory validation rules. As a result, valid file names containing '.' (e.g. "VSSetting_0.byaml") were incorrectly rejected. Fix Use VerifyNameValidFile instead of the directory validation routine when validating file names. Test Verified with Splatoon 2. Files such as "VSSetting_0.byaml" could not be opened before the change and now open successfully. Co-authored-by: Dmr77680 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4625 Reviewed-by: crueter Reviewed-by: lizzie --- src/core/hle/service/bcat/delivery_cache_file_service.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/service/bcat/delivery_cache_file_service.cpp b/src/core/hle/service/bcat/delivery_cache_file_service.cpp index 1d961e1655..a8773a2a78 100644 --- a/src/core/hle/service/bcat/delivery_cache_file_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_file_service.cpp @@ -39,7 +39,7 @@ Result IDeliveryCacheFileService::Open(const DirectoryName& dir_name_raw, LOG_DEBUG(Service_BCAT, "called, dir_name={}, file_name={}", dir_name, file_name); R_TRY(VerifyNameValidDir(dir_name_raw)); - R_TRY(VerifyNameValidDir(file_name_raw)); + R_TRY(VerifyNameValidFile(file_name_raw)); R_UNLESS(current_file == nullptr, ResultEntityAlreadyOpen); const auto dir = root->GetSubdirectory(dir_name);