Eliaaazzz commented on code in PR #39363:
URL: https://github.com/apache/beam/pull/39363#discussion_r3627434562
##########
runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/artifact/ArtifactStagingService.java:
##########
@@ -510,8 +510,10 @@ private String createFilename(String environment,
RunnerApi.ArtifactInformation
// all path separators.
List<String> components =
Splitter.onPattern("[^A-Za-z-_.]]").splitToList(path);
String base = components.get(components.size() - 1);
+ String sanitizedEnvironment =
environment.replaceAll("[<>:\"/\\\\|?*]", "_");
Review Comment:
Yes, you're right. Windows accepts Unicode filenames, so the ASCII-only
allowlist would unnecessarily replace valid non-ASCII characters and is
probably too restrictive for this fix.
The narrower denylist makes more sense here. If covering control characters
is worthwhile, they could instead be added explicitly, for example
[\x00-\x1F<>:"/\\|?*], while preserving Unicode. Thanks for pointing that out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]