mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 00:30:46 +00:00
fix: direct mode allows injecting unauthorized filesystem operations
This commit is contained in:
parent
cce7db5ebd
commit
c4f4ac3e01
@ -109,13 +109,13 @@ direct.action = function(inlet)
|
||||
error('Refusing to erase your harddisk!')
|
||||
end
|
||||
|
||||
local command = '/bin/mv $1 $2 || /bin/rm -rf $1'
|
||||
local command = '/bin/mv "$1" "$2" || /bin/rm -rf "$1"'
|
||||
|
||||
if
|
||||
config.delete ~= true and
|
||||
config.delete ~= 'running'
|
||||
then
|
||||
command = '/bin/mv $1 $2'
|
||||
command = '/bin/mv "$1" "$2"'
|
||||
end
|
||||
|
||||
spawnShell(
|
||||
|
Loading…
Reference in New Issue
Block a user