// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include #include #include namespace zen { /// Local ref policy that restricts file paths to a canonical data root directory. /// Uses weakly_canonical + string prefix comparison to detect path traversal. class DataRootLocalRefPolicy : public ILocalRefPolicy { public: explicit DataRootLocalRefPolicy(const std::filesystem::path& DataRoot); void ValidatePath(const std::filesystem::path& Path) const override; private: std::string m_CanonicalRoot; }; } // namespace zen