mirror of https://github.com/octoleo/lsyncd.git
Merge pull request #349 from wodny/master
fix: direct mode allows injecting unauthorized filesystem operations
This commit is contained in:
commit
b3f46e2462
|
@ -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