Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Could we isolate the database configuration of
If the test runs from an existing configured installation, those settings can override the intended temporary SQLite connection. Because the test drives real install/update flows, migrations or seeding could then reach a real database. Please create a clean, test-owned configuration, exclude local environment/custom configuration from the copy, and verify that the effective database connection points to the fixture’s temporary SQLite file before any database writes. A regression test with deliberately conflicting local configuration would help ensure that neither the fresh-install nor update scenario can touch the original database. SokilAI |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, the risk was real. With the isolation removed on purpose, the installer's migrations did reach the conflicting database ( Fixed in the latest commit:
With the copy filter disabled, all 10 flow cases stop before writing. |
Problem
The box "Remove the install folder" on the last page of the web installer does not work, seen on 3.5.9,
3.5.xand3.6.x: the folder stays and the browser getsNot found. If you were installing Evolution CMS, the installer session has expired.It happens on a new site and on an update, on every web server.install/src/controllers/install.phprequirescore/includes/define.inc.php, which ends withunset($base_path, $base_url)at the global scope. The controller then looks for$base_path . 'install.session.php', with$base_pathnow null, finds nothing, and skipswriteLock(). The page still prints a token, but the lock never holds it, soremove_installer.processor.phprefuses it. Seen on a real site by logging the values at that line:{"base":null,"exists":false}.InstallerWebPathTestdid not notice because it writes the lock by hand and runs only the processor.On nginx the box could not have worked anyway:
ng.inxruns PHP only from an allowlist, and the processor is not on it.Change
install.phpusesEVO_BASE_PATH, whichdefine.inc.phpleaves alone.ng.inxallowsmanager/processors/remove_installer.processor.php. It stays guarded by the one-time token.core/tests/Feature/InstallerRemovalFlowTest.php: a real site on SQLite behindphp -S, driven through the real forms like a browser. On a new site and on an update (an administrator with the installer grant from the Manager) it checks that the ticked box removes the folder and the lock, and that an unticked box keeps the folder, shut to other browsers. It also checks that a forged token removes nothing..envfiles,core/custom, connection files, the env cache), the server starts with an allowlisted environment, the site gets its owncore/custom/.env, and before the first write each test asks the site what it resolves and stops on anything else. Every flow runs next to conflicting settings that lead to a separate SQLite file, whose hash must not change.ApacheConfigHardeningTestpins theng.inxentry, and that other processors stay refused.Verification
In
evo-ci-php:8.4, PHP 8.4.26:3.5.xand3.6.x.Connection: default, Database: .../original.sqlite), so the risk is real.composer test -- --compact --fail-on-warning --fail-on-risky --fail-on-deprecation: on3.5.x2261 passed, 9 skipped, 0 failed.Notes
composer test./update.php, which the classic updater of the manager runs, is not on theng.inxallowlist either. Not changed here: opening it is a separate decision.3.6.xis in fix(installer): make "remove the install folder" work (3.6) #2552.🤖 Generated with Claude Code