mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
change mg_path_is_sane()
This commit is contained in:
1 parent
e1ccdc0570
commit
6697a2cfaa
9 files changed
+45
-34
No files matched your search
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user