[vlc-devel] [PATCH 4/4] httprequests.lua: return ".." instead of silent directory listing failure
Pierre Ynard
linkfanel at yahoo.fr
Tue Aug 11 04:47:06 CEST 2020
Refs #5075, #25021
diff --git a/share/lua/intf/modules/httprequests.lua b/share/lua/intf/modules/httprequests.lua
index fb9f8d6..0559791 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
--
Pierre Ynard
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel
mailing list