no shell=True

This commit is contained in:
Jack 2016-05-30 04:40:58 -04:00
parent 4cd1cdf495
commit ba605e985a

View file

@ -2229,9 +2229,9 @@ class LBRYDaemon(jsonrpc.JSONRPC):
path = p['path'] path = p['path']
if sys.platform == "darwin": if sys.platform == "darwin":
d = threads.deferToThread(subprocess.Popen, ("open -R %s" % path.replace(' ', '\ ')), shell=True) d = threads.deferToThread(subprocess.Popen, ['open', '-R', path])
else: else:
d = threads.deferToThread(subprocess.Popen, ("xdg-open %s" % path.replace(' ', '\ ')), shell=True) d = threads.deferToThread(subprocess.Popen, ['xdg-open', '-R', path])
d.addCallback(lambda _: self._render_response(True, OK_CODE)) d.addCallback(lambda _: self._render_response(True, OK_CODE))
return d return d