Skip to content

Commit

Permalink
Drop call of libxml_set_external_entity_loader
Browse files Browse the repository at this point in the history
  • Loading branch information
hoellen committed Sep 21, 2023
1 parent e627d1f commit 18da631
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rootfs/usr/local/etc/php/snuffleupagus/nextcloud-php8.rules
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ sp.disable_function.function("ini_get").param("option").value("open_basedir").fi
sp.disable_function.function("ini_get").param("option").value("allow_url_fopen").filename("/nextcloud/3rdparty/guzzlehttp/guzzle/src/Utils.php").allow();
sp.disable_function.function("exec").param("command").value("apachectl -M | grep mpm").filename("/nextcloud/apps2/spreed/lib/Settings/Admin/AdminSettings.php").allow();

# Nextcloud inherently enables XXE-Protection since 27.0.1, therefore, drop setting a new external entity loader
sp.disable_function.function("libxml_set_external_entity_loader").filename("/nextcloud/lib/base.php").allow();
sp.disable_function.function("libxml_set_external_entity_loader").drop();

# Harden the `chmod` function (0777 (oct = 511, 0666 = 438)
sp.disable_function.function("chmod").param("permissions").value("438").drop();
sp.disable_function.function("chmod").param("permissions").value("511").drop();
Expand Down

0 comments on commit 18da631

Please sign in to comment.