Added vulnerability where strings would not be escaped when pass to shell command
This commit is contained in:
parent
9abd7fa431
commit
8c97995c2f
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import os
|
||||||
import math
|
import math
|
||||||
import wave
|
import wave
|
||||||
import contextlib
|
import contextlib
|
||||||
import shutil
|
import shutil, pipes
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import hashlib
|
import hashlib
|
||||||
|
@ -162,7 +162,7 @@ def walk_supported(directory, clean_empties=False):
|
||||||
|
|
||||||
|
|
||||||
def file_locked(path):
|
def file_locked(path):
|
||||||
cmd = "lsof %s" % path
|
cmd = "lsof %s" % (pipes.quote(path))
|
||||||
f = Popen(cmd, shell=True, stdout=PIPE).stdout
|
f = Popen(cmd, shell=True, stdout=PIPE).stdout
|
||||||
return bool(f.readlines())
|
return bool(f.readlines())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue