mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
refactor(dynamic): enhance path resolution, telemetry, and file handling for better compatibility and clarity
This commit is contained in:
parent
8abb023dd0
commit
8211d4fd47
12 changed files with 217 additions and 39 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue