Exemple #1
0
        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);
        }
Exemple #2
0
 public static string SanitiseName(string name)
 {
     return(DynamicConfigFile.SanitizeName(name));
 }