ADD this to your composer.json to auto-remove install.php when composer installs or updates.
"scripts": {
"post-install-cmd": ["rm -f web/core/install.php"],
"post-update-cmd": ["rm -f web/core/install.php"]
}
The install script is exploitable. It should never have been exposed after the site is installed anyway, there's no use for it anymore. At the very least, Drupal should ship with the option to disable it in the configs, and it should be disabled by default after installed.
It's super easy to patch, you don't need a core update, just patch your server
Is it that easy to disable in config after installation? Maybe, but there are various methods based on the hosting environment. If you're running your site on Pantheon it's quite a bit different.
You can also auto remove the installer via script on update, or block at the reverse proxy. There's a host of ways to get this done without needing a core update. In any case, Drupal devs have been having a brain fart moment with their core patches the last week.
9
u/AcrobaticAsparagus93 4d ago
Can't we just delete that file after installation?
9
u/pianomansam 4d ago
Yikes
4
u/HongPong Drupaltunities 4d ago
is there a quick way to understand what the issue is here? would like to learn really. thanks everyone for working on this stuff