Make wp-admin/update-core.php read-only

It has been reportedly replaced with original file by some security plugins.
This commit is contained in:
xZero707 2022-01-21 20:11:38 +01:00
parent cb7b0fd12c
commit 85d377192a
Signed by untrusted user who does not match committer: xZero707
GPG Key ID: 3CC53DCAA9C237BB

View File

@ -13,6 +13,8 @@ function disableUpdatesPatch() {
if [ "${DISABLE_WP_UPDATES}" != "false" ]; then
echo "> Disabling WordPress updates..."
patch /var/www/html/wp-admin/update-core.php </etc/wp-mods/wp-admin-update-core.patch
echo "> Making the patched file read-only..."
chmod 0440 /var/www/html/wp-admin/update-core.php
fi
}