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. |
The update widget writes update.php to the site root and opens it, and the catch-all of ng.inx answered 404, so the update could not start on nginx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ames its commit The lock gives "dev-main 18f1a03" and Composer prints "dev-main", so every update of a site with a package on a branch stopped and asked for consent. Two different references still count as a change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docker Swarm names services project_service, and the hostname filter refused them, so the installer could not reach a database in such a stack. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…base The name check refused "/", so a database on a mounted folder could not be chosen in the browser. It stays a SQLite thing, and dots stay refused, so the name cannot leave core/database. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
REMOTE_ADDR behind a proxy is the proxy, so the address check of the lock compared one value for everyone, and on the same host that value is loopback, which may take over a lock: a stranger could take a running install. The lock now keeps the forwarded client next to REMOTE_ADDR. Without a proxy nothing changes, and the header cannot be used to pass for another address. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ment overrides
The connection config asks env('DB_*') first, so what the form said about
those settings was dropped without a word.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s release An update keeps the site's .htaccess, so a site installed before a rule was added stays without it: on 3.5.8 updated to 3.5.9 dumps under assets could be read and PHP under assets ran. The file stays the operator's: make:site and the dashboard name what is missing, and the warning can be hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.Other fixes in this PR
One commit each, found while running sites through EasyPanel:
ng.inxlets/update.phpthrough, behind the same access limit as the manager. The classic updater of the manager runs it.CustomComposerPackagesno longer treatsdev-mainanddev-main 18f1a03as a change. Two different commits still count as a change.core/database. Dots stay refused, so the path cannot leave it.client@remotewhen a valid forwarded address is present,REMOTE_ADDRas before otherwise. The cost: a forwarded header a local proxy passes on changes the identity, so a developer behind one waits for the lock to expire instead of taking it over.DB_*in the environment.make:sitewarn when.htaccesslacks the rules of the release (HtaccessRules, Apache only, can be hidden). The file itself is not changed.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.x2309 passed, 9 skipped, 0 failed.ng.inx:/update.phpreaches FastCGI,/other.phpand/update.php/evil.phpstay refused.ht.access, a warning naming the rule once the rule against PHP underassetsis removed.make:sitewarning during a real update, the lock behind a real proxy, the notice on the form. A SQLite subfolder was not tried in a browser; the web installer needs the folder to exist.Notes
composer test.3.6.xis in fix(installer): make "remove the install folder" work (3.6) #2552.🤖 Generated with Claude Code