The row in wcf1_application is created very early in the installation process,
even before the application directory is selected. This causes it to contain
bogus data. Now when pressing F5 during the folder section for whatever reason
the application technically is installed, but it's not usable due to the
missing XXXCore class. When the cache is being cleared this will brick the
whole community.
Taint apps until a proper application directory is selected. This reduces the
time window for human error, because it's likely that the `file` PIP runs very
soon after.
'domainName' => $host,
'domainPath' => $path,
'cookieDomain' => $host,
- 'packageID' => $package->packageID
+ 'packageID' => $package->packageID,
+ 'isTainted' => 1,
]);
}
}
$domainPath = FileUtil::addLeadingSlash($domainPath);
- // update application path
+ // update application path and untaint application
$application = new Application($this->getPackage()->packageID);
$applicationEditor = new ApplicationEditor($application);
- $applicationEditor->update(['domainPath' => $domainPath]);
+ $applicationEditor->update([
+ 'domainPath' => $domainPath,
+ 'isTainted' => 0,
+ ]);
// create directory and set permissions
@mkdir($packageDir, 0777, true);