private string CheckPath(string filename) { filename = DynamicConfigFile.SanitizeName(filename); string fullPath = Path.GetFullPath(filename); if (!fullPath.StartsWith(this._chroot, StringComparison.Ordinal)) { throw new Exception(string.Concat("Only access to oxide directory!\nPath: ", fullPath)); } return(fullPath); }
public static string SanitiseName(string name) { return(DynamicConfigFile.SanitizeName(name)); }