Revert "fix: don't allow absolute paths (duh)"

This reverts commit b1a847cf2c.
This commit is contained in:
LordMZTE 2023-03-22 19:21:52 +01:00
parent ff6aa2f93a
commit e90dfe00ca
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ pub fn vidsRoute(
const filepath = try std.fs.path.resolve(std.heap.c_allocator, &.{ state.vids_dir, basepath });
defer std.heap.c_allocator.free(filepath);
if (std.fs.path.isAbsolute(filepath) or std.mem.startsWith(u8, filepath, ".."))
if (std.mem.startsWith(u8, filepath, ".."))
return c.OCS_FORBIDDEN;
const filepath_z = try std.heap.c_allocator.dupeZ(u8, filepath);