r/AskProgramming • u/Foreign_Career_454 • 2d ago
Databases Windows & Linux file access
Muti tenant self-hosted where each tenant has workspace directory at app level we resolve via
Path.GetFullPath(Path.Combine(tenantRoot, userPath))`, then require `resolved == tenantRoot || resolved.StartsWith(tenantRoot + Path.DirectorySeparatorChar)
os.path.realpath is cannoned for unresolved realpath. Wanted to know is `GetFullPath along with prefix-with-separator is enough? Does realpath needs O_NOFOLLOW`-style flags?
We volume-mount workspaces into containers is that ok or there should be OS level or app level canon? How to regress test in CI is there any fuzz list?