mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-18 21:48:24 -04:00
partially revert #1559
Instead of automatically adding custom templates, we log an error if that template is missing in the available templates. Still mitigates arbitrary file inclusion, as the string is now checked against a fixed allow list.
This commit is contained in:
@@ -6,7 +6,9 @@ use Google\Cloud\Storage\Bucket;
|
||||
use Google\Cloud\Storage\Connection\ConnectionInterface;
|
||||
use Google\Cloud\Storage\StorageClient;
|
||||
use Google\Cloud\Storage\StorageObject;
|
||||
use PrivateBin\Configuration;
|
||||
use PrivateBin\Persistence\ServerSalt;
|
||||
use PrivateBin\TemplateSwitcher;
|
||||
|
||||
error_reporting(E_ALL | E_STRICT);
|
||||
|
||||
@@ -26,6 +28,7 @@ if (!defined('CONF_SAMPLE')) {
|
||||
|
||||
require PATH . 'vendor/autoload.php';
|
||||
Helper::updateSubresourceIntegrity();
|
||||
TemplateSwitcher::setAvailableTemplates(Configuration::getDefaults()['main']['availabletemplates']);
|
||||
|
||||
/**
|
||||
* Class Helper provides unit tests pastes and comments of various formats
|
||||
|
||||
Reference in New Issue
Block a user