Merge branch 'release/1.7.50.8'

This commit is contained in:
Andy Miller
2025-11-06 18:56:04 +00:00
4 changed files with 8 additions and 21 deletions

8
.gitattributes vendored
View File

@@ -1,8 +0,0 @@
# Exclude development and CI/CD files from release archives
/.github export-ignore
/.phan export-ignore
/tests export-ignore
/codeception.yml export-ignore
/.travis.yml export-ignore
/.dependencies export-ignore
/.editorconfig export-ignore

View File

@@ -1,3 +1,10 @@
# v1.7.50.8
## 11/06/2025
1. [](#bugfix)
* Removed over zealous safety checks
* Removed .gitattributes which was causing some unintended issues
# v1.7.50.7
## 11/05/2025

View File

@@ -9,7 +9,7 @@
// Some standard defines
define('GRAV', true);
define('GRAV_VERSION', '1.7.50.7');
define('GRAV_VERSION', '1.7.50.8');
define('GRAV_SCHEMA', '1.7.0_2020-11-20_1');
define('GRAV_TESTING', false);

View File

@@ -914,18 +914,6 @@ class SafeUpgradeService
$live = $this->rootPath . '/' . $relative;
$stage = $packagePath . '/' . $relative;
// Only delete from staging area, NEVER from live installation
// Check if stage path is directly under root (e.g., /home/grav/user)
// but allow subdirectories (e.g., /home/grav/tmp/.../package/user)
$realStage = realpath(dirname($stage));
$realRoot = realpath($this->rootPath);
if ($realStage === $realRoot) {
throw new RuntimeException(
'SAFETY VIOLATION: Attempted to delete directory from live installation during hydration. ' .
'Stage path appears to be directly in live root. This should never happen.'
);
}
Folder::delete($stage);
if (!is_dir($live)) {