Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

SanitizeUserName

function SanitizeUserName(const aUser: string): string;
Reduces an authenticated SSH username to a single safe path component for the PerUserSubDir jail: characters outside A-Za-z0-9 and dash/underscore/dot become underscores, leading dots are stripped, and an empty result becomes 'default', so the derived directory name can never traverse out of RootDir.