Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtSFTPJail.MapToPhysical

function MapToPhysical(const aSftpPath: string; out aPhysical: string): Boolean;
Maps a client-supplied virtual (POSIX slash) path to a physical path, resolving single-dot and double-dot purely inside the namespace and failing closed (Result False) on any path that would escape the root or carry characters the OS would reinterpret - and on one that leads out of the root on disk, through a junction or a symbolic link. This is the security-critical check applied to every path a request names.