mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-05 13:22:38 +02:00
Merge pull request #352 from RinZ27/security-fixes-path-traversal-cmd-injection
fix path traversal and CLI command validation
This commit is contained in:
commit
99e219b8a0
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import { promisify } from 'util';
|
|||
import { getSecurityAllowList } from '../../config/security.js';
|
||||
|
||||
const execPromise = promisify(exec);
|
||||
const COMMAND_SPLIT_REGEX = /(?:\|\||&&|;|\||\n)/;
|
||||
const COMMAND_SPLIT_REGEX = /(?:\|\||&&|;|\||\n|`|\$\(|\))/;
|
||||
const ENV_ASSIGNMENT_REGEX = /^[A-Za-z_][A-Za-z0-9_]*=.*/;
|
||||
const WRAPPER_COMMANDS = new Set(['sudo', 'env', 'time', 'command']);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue