aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2024-02-27 17:15:36 +0100
committerKim Alvefur <zash@zash.se>2024-02-27 17:15:36 +0100
commit3d2bad3d4b367d200c9368f5dc75ddfd46d0b41b (patch)
tree662e5320b746e6d1c66fedb194632a34292fee04 /net
parentmod_s2s: Comment on why we avoid hostnames in stanza bounce messages (diff)
parentnet.http.files: Validate argument to setup function (diff)
downloadprosody-3d2bad3d4b367d200c9368f5dc75ddfd46d0b41b.tar.xz
prosody-3d2bad3d4b367d200c9368f5dc75ddfd46d0b41b.zip
Merge 0.12->trunk
Diffstat (limited to 'net')
-rw-r--r--net/http/files.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/files.lua b/net/http/files.lua
index 24d9f2047..8ef054e22 100644
--- a/net/http/files.lua
+++ b/net/http/files.lua
@@ -58,7 +58,7 @@ local function serve(opts)
local cache = new_cache(opts.cache_size or 256);
local cache_max_file_size = tonumber(opts.cache_max_file_size) or 1024
-- luacheck: ignore 431
- local base_path = opts.path;
+ local base_path = assert(opts.path, "invalid argument to net.http.files.path(), missing required 'path'");
local dir_indices = opts.index_files or { "index.html", "index.htm" };
local directory_index = opts.directory_index;
local function serve_file(event, path)