diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-04 19:04:16 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-07-04 19:04:16 -0500 |
| commit | f68455f5560b983d0fe330be09de42aa29e3f5be (patch) | |
| tree | 8011bced555a91abc15a9fd2ece79d97f489f092 /docs | |
| parent | df331ce2f881aa89920c004eafcfd327c91b66f0 (diff) | |
| download | slskd-f68455f5560b983d0fe330be09de42aa29e3f5be.tar.gz | |
tweak
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/config.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/config.md b/docs/config.md index ff3e8410..6f01c2af 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1041,10 +1041,10 @@ Processes are started in the `/scripts` directory (meaning the working directory The data associated with the event that's invoking your script is stringified to JSON and set as the value of the `SLSKD_SCRIPT_DATA` environment variable. Whatever command or script you specify will need to read this value and handle the data. -> [!DANGER] +> [!CAUTION] > **Remote Code Execution Risk**: The event data in `$SLSKD_SCRIPT_DATA` originates from the Soulseek network and may contain malicious content. Passing this data as command-line arguments could allow attackers to inject shell commands through specially crafted filenames, usernames, or other fields. For example, a filename like `song"; rm -rf /; echo "` could delete your entire filesystem if passed unsafely to a shell command. > -> **Safe practices:** +> **Best practices:** > - ✅ Read `$SLSKD_SCRIPT_DATA` as an environment variable > - ✅ Parse the JSON and validate/sanitize individual fields before use > - ✅ Use programming languages with proper JSON parsing (Python, Node.js, etc.) |
