change mg_path_is_sane()

This commit is contained in:
Sergio R. Caprile committed 2024-04-22 11:27:22 -03:00
1 parent e1ccdc0570
commit 6697a2cfaa
9 files changed
+45 -34

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ static void cb(struct mg_connection *c, int ev, void *ev_data) {
part.filename.buf, part.body.len));
mg_snprintf(path, sizeof(path), "%s/%.*s", s_upload_dir,
part.filename.len, part.filename.buf);
if (mg_path_is_sane(path)) {
if (mg_path_is_sane(mg_str(path))) {
mg_file_write(&mg_fs_posix, path, part.body.buf, part.body.len);
total_bytes += part.body.len;
num_files++;