fix: allow /Users/ prefix in path validation for macOS
- SHA
2dad81eb058f811d71f4190312e56dbc719963fe- Parents
-
64a8fb4 - Tree
defd689
2dad81e
2dad81eb058f811d71f4190312e56dbc719963fe64a8fb4
defd689| Status | File | + | - |
|---|---|---|---|
| M |
src/toml_parser.c
|
2 | 1 |
src/toml_parser.cmodified@@ -531,7 +531,8 @@ bool toml_validate_file_path(const char *path) { | ||
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | /* Check for absolute paths outside user home */ |
| 534 | - if (path[0] == '/' && !string_starts_with(path, "/home/") && | |
| 534 | + if (path[0] == '/' && !string_starts_with(path, "/home/") && | |
| 535 | + !string_starts_with(path, "/Users/") && | |
| 535 | 536 | !string_starts_with(path, "/tmp/")) { |
| 536 | 537 | log_warning("Suspicious absolute path: %s", path); |
| 537 | 538 | return false; |