refactor(dynamic): enhance path resolution, telemetry, and file handling for better compatibility and clarity

This commit is contained in:
elipeter 2026-05-14 02:37:01 -05:00
parent 8abb023dd0
commit 8211d4fd47
12 changed files with 217 additions and 39 deletions

View file

@ -7,7 +7,10 @@ import java.io.*;
import java.nio.file.*;
public class Entry {
private static final String BASE_DIR = "/var/data";
// `/tmp` exists on Linux and macOS so `toRealPath()` resolves cleanly on
// both. The traversal payload still escapes the base (which is the point
// of the safe-path check) so the verdict stays NotConfirmed.
private static final String BASE_DIR = "/tmp";
public static void readFile(String userPath) throws Exception {
Path base = Paths.get(BASE_DIR).toRealPath();