harden root_dir

This commit is contained in:
Sergio R. Caprile committed 2026-10-27 11:09:08 -03:00
1 parent b766c65615
commit 26b971b4a8
5 files changed
+16 -2

No files matched your search

+2
View File
@@ -96,6 +96,8 @@ struct mg_dash {
struct mg_fs *upload_fs; // FS for uploads/listing, default &mg_fs_posix
// Resolves the built-in file manager's root dir for user u, e.g. per-user
// upload directories. NULL: file manager disabled
// - The returned directory must be nonempty and must not contain ',' or '=',
// because it is used as an mg_http_serve_opts::root_dir mapping target.
bool (*files_dir)(const struct mg_dash_user *u, char *buf, size_t len);
};