[vlc-commits] httprequests.lua: return ".." instead of silent directory listing failure
Pierre Ynard
git at videolan.org
Tue Aug 18 17:07:34 CEST 2020
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Tue Aug 18 17:05:34 2020 +0200| [dc8da491eb33aa3508950662541ed755aa983ee6] | committer: Pierre Ynard
httprequests.lua: return ".." instead of silent directory listing failure
Refs #5075, #25021
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc8da491eb33aa3508950662541ed755aa983ee6
---
share/lua/intf/modules/httprequests.lua | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index f5e9618a87..1f564c6f44 100644
--- a/share/lua/intf/modules/httprequests.lua
+++ b/share/lua/intf/modules/httprequests.lua
@@ -380,6 +380,12 @@ getbrowsetable = function ()
local d = vlc.net.opendir(dir)
table.sort(d)
+ --FIXME: this is the wrong place to do this, but this still offers
+ --some useful mitigation: see #25021
+ if #d == 0 and dir ~= "" then
+ table.insert(d, "..")
+ end
+
for _,f in pairs(d) do
if f == ".." or not string.match(f,"^%.") then
local path = dir..f
More information about the vlc-commits
mailing list