Skip to content

Commit 3c13214

Browse files
committed
Revert "Use full path for curl to prevent bugs or code"
This reverts commit 738e5d1, pull request #57. The $PATH environment variable exists specifically for the purpose of looking- up binaries' locations in a system-independent manner. If $PATH is overwritten, which the user has full discretion to do, then so be it. If the $PATH is overwritten by compromise, then the system itself is already compromised and this change prevents nothing. Furthermore, many operating systems install packages and user-compiled software into PREFIX=/usr/local, causing this commit to break this script. Signed-off-by: Bryce Chidester <bryce@cobryce.com>
1 parent 0052e72 commit 3c13214

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

matrix.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ function MatrixServer:Upload(room_id, filename)
15761576
local url = w.config_get_plugin('homeserver_url') ..
15771577
('_matrix/media/r0/upload?access_token=%s')
15781578
:format( urllib.quote(SERVER.access_token) )
1579-
w.hook_process_hashtable('/usr/bin/curl', {
1579+
w.hook_process_hashtable('curl', {
15801580
arg1 = '--data-binary', -- no encoding of data
15811581
arg2 = '@'..filename, -- @means curl will load the filename
15821582
arg3 = '-XPOST', -- HTTP POST method

0 commit comments

Comments
 (0)