mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-23 07:08:33 +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!')
|
error('Refusing to erase your harddisk!')
|
||||||
end
|
end
|
||||||
|
|
||||||
local command = '/bin/mv $1 $2 || /bin/rm -rf $1'
|
local command = '/bin/mv "$1" "$2" || /bin/rm -rf "$1"'
|
||||||
|
|
||||||
if
|
if
|
||||||
config.delete ~= true and
|
config.delete ~= true and
|
||||||
config.delete ~= 'running'
|
config.delete ~= 'running'
|
||||||
then
|
then
|
||||||
command = '/bin/mv $1 $2'
|
command = '/bin/mv "$1" "$2"'
|
||||||
end
|
end
|
||||||
|
|
||||||
spawnShell(
|
spawnShell(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user