Fix ZIP dependency and allow imports into owned multisite workspaces
DC CMS qualification / qualify (push) Successful in 1m54s
DC CMS qualification / qualify (push) Successful in 1m54s
This commit is contained in:
+2
-1
@@ -1647,7 +1647,8 @@ function zipCommonRoot(entries) {
|
||||
|
||||
async function clearSiteWorkspace() {
|
||||
const resolvedRoot = resolve(repoRoot);
|
||||
if (resolvedRoot === "/" || resolvedRoot === cmsRoot || resolvedRoot.startsWith(`${cmsRoot}/`)) {
|
||||
const ownedProjectRoot = resolve(projectsRoot, "sites", activeProjectId);
|
||||
if (resolvedRoot === "/" || resolvedRoot === cmsRoot || (resolvedRoot.startsWith(`${cmsRoot}/`) && resolvedRoot !== ownedProjectRoot)) {
|
||||
throw new Error("Опасный путь workspace сайта, очистка запрещена");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user