luci-base: don't propagate null bytes in path information
[project/luci.git] / modules / luci-base / luasrc / dispatcher.lua
index 91b8667..fc497ca 100644 (file)
@@ -113,7 +113,8 @@ function httpdispatch(request, prefix)
                end
        end
 
-       for node in pathinfo:gmatch("[^/]+") do
+       local node
+       for node in pathinfo:gmatch("[^/%z]+") do
                r[#r+1] = node
        end