generator-razor 14.0.50 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/index.js +480 -206
- package/app/templates/143/db.sql +33 -1
- package/app/templates/143/typo3conf/PackageStates.php +3 -0
- package/app/templates/143/typo3conf/system/settings.php +3 -7
- package/app/templates/143-composer/_.htaccess-dev +691 -0
- package/app/templates/143-composer/_.htaccess-dev-ssl +691 -0
- package/app/templates/143-composer/composer.json +94 -0
- package/app/templates/143-composer/config/system/settings.php +105 -0
- package/app/templates/143-composer/db.sql +1688 -0
- package/app/templates/143-composer/packages/razorbootstrap/composer.json +39 -0
- package/app/templates/143-composer/packages/razorbootstrap/ext_emconf.php +32 -0
- package/app/templates/143-composer/packages/razorkickstart/Classes/Command/InstallCommand.php +138 -0
- package/app/templates/143-composer/packages/razorkickstart/Classes/Command/PrepareCommand.php +81 -0
- package/app/templates/143-composer/packages/razorkickstart/Classes/Command/UpdateTerCommand.php +64 -0
- package/app/templates/143-composer/packages/razorkickstart/Configuration/Services.yaml +8 -0
- package/app/templates/143-composer/packages/razorkickstart/composer.json +31 -0
- package/app/templates/143-composer/public/fileadmin/.htaccess +37 -0
- package/app/templates/143-composer/public/fileadmin/_temp_/.htaccess +15 -0
- package/app/templates/143-composer/public/fileadmin/_temp_/index.html +7 -0
- package/app/templates/143-composer/public/fileadmin/user_upload/.htaccess +33 -0
- package/app/templates/143-composer/public/fileadmin/user_upload/_temp_/importexport/.htaccess +15 -0
- package/app/templates/143-composer/public/fileadmin/user_upload/_temp_/importexport/index.html +7 -0
- package/app/templates/143-composer/public/fileadmin/user_upload/_temp_/index.html +0 -0
- package/app/templates/143-composer/public/fileadmin/user_upload/index.html +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rafu1987/razorbootstrap",
|
|
3
|
+
"type": "typo3-cms-extension",
|
|
4
|
+
"description": "razor Bootstrap - Installs the complete razor framework",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"razorbootstrap"
|
|
7
|
+
],
|
|
8
|
+
"homepage": "https://github.com/rafu1987/razor",
|
|
9
|
+
"support": {
|
|
10
|
+
"source": "https://github.com/rafu1987/razor",
|
|
11
|
+
"issues": "https://github.com/rafu1987/razor/issues"
|
|
12
|
+
},
|
|
13
|
+
"license": "GPL-2.0-or-later",
|
|
14
|
+
"authors": [
|
|
15
|
+
{
|
|
16
|
+
"name": "Raphael Zschorsch",
|
|
17
|
+
"role": "Developer",
|
|
18
|
+
"email": "rafu1987@gmail.com"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"require": {
|
|
22
|
+
"typo3/cms-extbase": "^14.3",
|
|
23
|
+
"typo3/cms-fluid": "^14.3",
|
|
24
|
+
"typo3/cms-core": "^14.3",
|
|
25
|
+
"php": "^8.2 || ^8.5",
|
|
26
|
+
"rafu1987/razor": "^14.3",
|
|
27
|
+
"rafu1987/razorce": "^14.3",
|
|
28
|
+
"rafu1987/razornews": "^14.3",
|
|
29
|
+
"rafu1987/razormin": "^14.3",
|
|
30
|
+
"rafu1987/razorcookieconsent": "^14.3",
|
|
31
|
+
"rafu1987/razorsite": "^14.3"
|
|
32
|
+
},
|
|
33
|
+
"extra": {
|
|
34
|
+
"typo3/cms": {
|
|
35
|
+
"extension-key": "razorbootstrap",
|
|
36
|
+
"version": "14.3.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
$EM_CONF[$_EXTKEY] = [
|
|
4
|
+
'title' => 'razor bootstrap',
|
|
5
|
+
'description' => 'Installs the complete razor framework',
|
|
6
|
+
'category' => 'misc',
|
|
7
|
+
'author' => 'Raphael Zschorsch',
|
|
8
|
+
'author_email' => 'rafu1987@gmail.com',
|
|
9
|
+
'state' => 'stable',
|
|
10
|
+
'version' => '14.3.0',
|
|
11
|
+
'constraints' => [
|
|
12
|
+
'depends' => [
|
|
13
|
+
'extbase' => '14.3.0-14.99.99',
|
|
14
|
+
'fluid' => '14.3.0-14.99.99',
|
|
15
|
+
'typo3' => '14.3.0-14.99.99',
|
|
16
|
+
'php' => '8.2.0-8.5.99',
|
|
17
|
+
'razor' => '14.3.0-14.99.99',
|
|
18
|
+
'razorce' => '14.3.0-14.99.99',
|
|
19
|
+
'razornews' => '14.3.0-14.99.99',
|
|
20
|
+
'razormin' => '14.3.0-14.99.99',
|
|
21
|
+
'razorcookieconsent' => '14.3.0-14.99.99',
|
|
22
|
+
'razorsite' => '14.3.0-14.99.99',
|
|
23
|
+
],
|
|
24
|
+
'conflicts' => [],
|
|
25
|
+
'suggests' => [],
|
|
26
|
+
],
|
|
27
|
+
'autoload' => [
|
|
28
|
+
'psr-4' => [
|
|
29
|
+
'RZ\\Razorbootstrap\\' => 'Classes',
|
|
30
|
+
],
|
|
31
|
+
],
|
|
32
|
+
];
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This file is part of the TYPO3 CMS project.
|
|
7
|
+
*
|
|
8
|
+
* It is free software; you can redistribute it and/or modify it under
|
|
9
|
+
* the terms of the GNU General Public License, either version 2
|
|
10
|
+
* of the License, or any later version.
|
|
11
|
+
*
|
|
12
|
+
* For the full copyright and license information, please read the
|
|
13
|
+
* LICENSE.txt file that was distributed with this source code.
|
|
14
|
+
*
|
|
15
|
+
* The TYPO3 project - inspiring people to share!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
namespace RZ\Razorkickstart\Command;
|
|
19
|
+
|
|
20
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
21
|
+
use Symfony\Component\Console\Command\Command;
|
|
22
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
23
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
24
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
25
|
+
use TYPO3\CMS\Core\Core\ClassLoadingInformation;
|
|
26
|
+
use TYPO3\CMS\Core\Package\PackageManager;
|
|
27
|
+
use TYPO3\CMS\Extensionmanager\Domain\Model\DownloadQueue;
|
|
28
|
+
use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
|
|
29
|
+
|
|
30
|
+
#[AsCommand(
|
|
31
|
+
name: 'razorkickstart:install',
|
|
32
|
+
description: 'Activates the complete razor framework'
|
|
33
|
+
)]
|
|
34
|
+
final class InstallCommand extends Command
|
|
35
|
+
{
|
|
36
|
+
public function __construct(
|
|
37
|
+
private readonly ExtensionManagementService $extensionManagementService,
|
|
38
|
+
private readonly DownloadQueue $downloadQueue,
|
|
39
|
+
private readonly PackageManager $packageManager
|
|
40
|
+
) {
|
|
41
|
+
parent::__construct();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
protected function execute(
|
|
45
|
+
InputInterface $input,
|
|
46
|
+
OutputInterface $output
|
|
47
|
+
): int {
|
|
48
|
+
$io = new SymfonyStyle($input, $output);
|
|
49
|
+
|
|
50
|
+
$io->writeln('<fg=cyan>Preparing razor package states...</>');
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Resolve the complete installation queue again.
|
|
54
|
+
*
|
|
55
|
+
* All TER dependencies have already been downloaded by
|
|
56
|
+
* razorkickstart:prepare.
|
|
57
|
+
*/
|
|
58
|
+
$this->extensionManagementService->markExtensionForInstallation(
|
|
59
|
+
'razorbootstrap'
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
$dependencyErrors = $this->extensionManagementService
|
|
63
|
+
->getDependencyErrors();
|
|
64
|
+
|
|
65
|
+
if ($dependencyErrors !== []) {
|
|
66
|
+
$io->error([
|
|
67
|
+
'razor dependencies could not be resolved.',
|
|
68
|
+
print_r($dependencyErrors, true),
|
|
69
|
+
]);
|
|
70
|
+
|
|
71
|
+
return Command::FAILURE;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* Nothing should need downloading anymore.
|
|
76
|
+
*/
|
|
77
|
+
if (
|
|
78
|
+
!$this->downloadQueue->isQueueEmpty('download')
|
|
79
|
+
|| !$this->downloadQueue->isQueueEmpty('update')
|
|
80
|
+
) {
|
|
81
|
+
$io->error(
|
|
82
|
+
'razor dependencies are not completely prepared.'
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
return Command::FAILURE;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
$installQueue = $this->downloadQueue
|
|
89
|
+
->resetExtensionInstallStorage();
|
|
90
|
+
|
|
91
|
+
if ($installQueue === []) {
|
|
92
|
+
$io->error(
|
|
93
|
+
'No razor extensions were found in the installation queue.'
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
return Command::FAILURE;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/*
|
|
100
|
+
* Only update PackageStates.php.
|
|
101
|
+
*
|
|
102
|
+
* Do not use PackageActivationService here because it would
|
|
103
|
+
* immediately rebuild DI/TCA in the current process.
|
|
104
|
+
*/
|
|
105
|
+
foreach (array_keys($installQueue) as $extensionKey) {
|
|
106
|
+
$io->writeln(
|
|
107
|
+
sprintf(
|
|
108
|
+
'<fg=green>✓ Activating package %s...</>',
|
|
109
|
+
$extensionKey
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
$this->packageManager->activatePackage(
|
|
114
|
+
$extensionKey
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* Important for TYPO3 Classic mode:
|
|
120
|
+
*
|
|
121
|
+
* activatePackage() registers class-loading information only
|
|
122
|
+
* transiently for this process. Persist the complete class map
|
|
123
|
+
* and PSR-4 configuration so the next TYPO3 process knows all
|
|
124
|
+
* newly activated extensions.
|
|
125
|
+
*/
|
|
126
|
+
$io->writeln(
|
|
127
|
+
'<fg=cyan>Rebuilding TYPO3 class loading information...</>'
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
ClassLoadingInformation::dumpClassLoadingInformation();
|
|
131
|
+
|
|
132
|
+
$io->success(
|
|
133
|
+
'razor package states successfully prepared.'
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
return Command::SUCCESS;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This file is part of the TYPO3 CMS project.
|
|
7
|
+
*
|
|
8
|
+
* It is free software; you can redistribute it and/or modify it under
|
|
9
|
+
* the terms of the GNU General Public License, either version 2
|
|
10
|
+
* of the License, or any later version.
|
|
11
|
+
*
|
|
12
|
+
* For the full copyright and license information, please read the
|
|
13
|
+
* LICENSE.txt file that was distributed with this source code.
|
|
14
|
+
*
|
|
15
|
+
* The TYPO3 project - inspiring people to share!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
namespace RZ\Razorkickstart\Command;
|
|
19
|
+
|
|
20
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
21
|
+
use Symfony\Component\Console\Command\Command;
|
|
22
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
23
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
24
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
25
|
+
use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
|
|
26
|
+
|
|
27
|
+
#[AsCommand(
|
|
28
|
+
name: 'razorkickstart:prepare',
|
|
29
|
+
description: 'Downloads all required razor dependencies'
|
|
30
|
+
)]
|
|
31
|
+
final class PrepareCommand extends Command
|
|
32
|
+
{
|
|
33
|
+
public function __construct(
|
|
34
|
+
private readonly ExtensionManagementService $extensionManagementService
|
|
35
|
+
) {
|
|
36
|
+
parent::__construct();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected function execute(
|
|
40
|
+
InputInterface $input,
|
|
41
|
+
OutputInterface $output
|
|
42
|
+
): int {
|
|
43
|
+
$io = new SymfonyStyle($input, $output);
|
|
44
|
+
|
|
45
|
+
$io->writeln('<fg=cyan>Preparing razor dependencies...</>');
|
|
46
|
+
|
|
47
|
+
$extension = $this->extensionManagementService->getExtension(
|
|
48
|
+
'razorbootstrap'
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* Resolve and download dependencies, but do NOT activate them.
|
|
53
|
+
*
|
|
54
|
+
* Activation must happen in a fresh TYPO3 process so the
|
|
55
|
+
* newly downloaded extensions are part of the DI container.
|
|
56
|
+
*/
|
|
57
|
+
$this->extensionManagementService
|
|
58
|
+
->setAutomaticInstallationEnabled(false);
|
|
59
|
+
|
|
60
|
+
$result = $this->extensionManagementService
|
|
61
|
+
->installExtension($extension);
|
|
62
|
+
|
|
63
|
+
if ($result === false) {
|
|
64
|
+
$io->error([
|
|
65
|
+
'razor dependencies could not be resolved.',
|
|
66
|
+
print_r(
|
|
67
|
+
$this->extensionManagementService->getDependencyErrors(),
|
|
68
|
+
true
|
|
69
|
+
),
|
|
70
|
+
]);
|
|
71
|
+
|
|
72
|
+
return Command::FAILURE;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
$io->success(
|
|
76
|
+
'razor dependencies successfully prepared.'
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return Command::SUCCESS;
|
|
80
|
+
}
|
|
81
|
+
}
|
package/app/templates/143-composer/packages/razorkickstart/Classes/Command/UpdateTerCommand.php
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This file is part of the TYPO3 CMS project.
|
|
7
|
+
*
|
|
8
|
+
* It is free software; you can redistribute it and/or modify it under
|
|
9
|
+
* the terms of the GNU General Public License, either version 2
|
|
10
|
+
* of the License, or any later version.
|
|
11
|
+
*
|
|
12
|
+
* For the full copyright and license information, please read the
|
|
13
|
+
* LICENSE.txt file that was distributed with this source code.
|
|
14
|
+
*
|
|
15
|
+
* The TYPO3 project - inspiring people to share!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
namespace RZ\Razorkickstart\Command;
|
|
19
|
+
|
|
20
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
21
|
+
use Symfony\Component\Console\Command\Command;
|
|
22
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
23
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
24
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
25
|
+
use TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand;
|
|
26
|
+
use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
|
|
27
|
+
use TYPO3\CMS\Extensionmanager\Remote\RemoteRegistry;
|
|
28
|
+
|
|
29
|
+
#[AsCommand(
|
|
30
|
+
name: 'razorkickstart:ter:update',
|
|
31
|
+
description: 'Updates the TYPO3 Extension Repository extension list'
|
|
32
|
+
)]
|
|
33
|
+
#[AsNonSchedulableCommand]
|
|
34
|
+
final class UpdateTerCommand extends Command
|
|
35
|
+
{
|
|
36
|
+
public function __construct(
|
|
37
|
+
private readonly RemoteRegistry $remoteRegistry
|
|
38
|
+
) {
|
|
39
|
+
parent::__construct();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protected function execute(
|
|
43
|
+
InputInterface $input,
|
|
44
|
+
OutputInterface $output
|
|
45
|
+
): int {
|
|
46
|
+
$io = new SymfonyStyle($input, $output);
|
|
47
|
+
|
|
48
|
+
$io->writeln('<fg=cyan>Updating TER extension list...</>');
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
foreach ($this->remoteRegistry->getListableRemotes() as $remote) {
|
|
52
|
+
$remote->getAvailablePackages(true);
|
|
53
|
+
}
|
|
54
|
+
} catch (ExtensionManagerException $exception) {
|
|
55
|
+
$io->error($exception->getMessage());
|
|
56
|
+
|
|
57
|
+
return Command::FAILURE;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$io->success('TER extension list successfully updated.');
|
|
61
|
+
|
|
62
|
+
return Command::SUCCESS;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rafu1987/razorkickstart",
|
|
3
|
+
"type": "typo3-cms-extension",
|
|
4
|
+
"description": "razor kickstart - razor kickstart",
|
|
5
|
+
"require": {
|
|
6
|
+
"typo3/cms-extbase": "^14.3",
|
|
7
|
+
"typo3/cms-fluid": "^14.3",
|
|
8
|
+
"typo3/cms-core": "^14.3",
|
|
9
|
+
"php": "^8.2 || ^8.5"
|
|
10
|
+
},
|
|
11
|
+
"autoload": {
|
|
12
|
+
"psr-4": {
|
|
13
|
+
"RZ\\Razorkickstart\\": "Classes/"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"extra": {
|
|
17
|
+
"typo3/cms": {
|
|
18
|
+
"extension-key": "razorkickstart",
|
|
19
|
+
"version": "14.3.0",
|
|
20
|
+
"extra": {
|
|
21
|
+
"typo3/cms": {
|
|
22
|
+
"extension-key": "razor",
|
|
23
|
+
"version": "14.3.0",
|
|
24
|
+
"Package": {
|
|
25
|
+
"providesPackages": {}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file applies Content-Security-Policy (CSP) HTTP headers
|
|
2
|
+
# to directories containing (user uploaded) resources like
|
|
3
|
+
# /fileadmin/ or /uploads/
|
|
4
|
+
|
|
5
|
+
<IfModule mod_headers.c>
|
|
6
|
+
# matching requested *.pdf files only (strict rules block Safari showing PDF documents)
|
|
7
|
+
<FilesMatch "\.pdf$">
|
|
8
|
+
Header set Content-Security-Policy "default-src 'self' 'unsafe-inline'; script-src 'none'; object-src 'self'; plugin-types application/pdf;"
|
|
9
|
+
</FilesMatch>
|
|
10
|
+
# matching requested *.svg files only (allows using inline styles when serving SVG files)
|
|
11
|
+
<FilesMatch "\.svg">
|
|
12
|
+
Header set Content-Security-Policy "default-src 'self'; script-src 'none'; style-src 'unsafe-inline'; object-src 'none'; sandbox;"
|
|
13
|
+
</FilesMatch>
|
|
14
|
+
# matching anything else, using negative lookbehind pattern
|
|
15
|
+
<FilesMatch "(?<!\.(?:pdf|svg))$">
|
|
16
|
+
Header set Content-Security-Policy "default-src 'self'; script-src 'none'; style-src 'none'; object-src 'none'; sandbox;"
|
|
17
|
+
</FilesMatch>
|
|
18
|
+
|
|
19
|
+
# =================================================================
|
|
20
|
+
# Variations to send CSP header only when it has not be set before.
|
|
21
|
+
# Adjust all `Header set` instructions above
|
|
22
|
+
# Header set Content-Security-Policy "<directives>"
|
|
23
|
+
# with substitutes shown below
|
|
24
|
+
#
|
|
25
|
+
# -----------------------------------------------------------------
|
|
26
|
+
# a) for Apache 2.4 (having `setifempty`)
|
|
27
|
+
# -----------------------------------------------------------------
|
|
28
|
+
# Header setifempty Content-Security-Policy "<directives>"
|
|
29
|
+
#
|
|
30
|
+
# -----------------------------------------------------------------
|
|
31
|
+
# b) for Apache 2.2 (using fallbacks)
|
|
32
|
+
# -----------------------------------------------------------------
|
|
33
|
+
# Header append Content-Security-Policy ""
|
|
34
|
+
# Header edit Content-Security-Policy "^$" "<directives>"
|
|
35
|
+
#
|
|
36
|
+
# =================================================================
|
|
37
|
+
</IfModule>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file restricts access to the fileadmin/_temp_ directory. It is
|
|
2
|
+
# meant to protect temporary files which could contain sensible
|
|
3
|
+
# information. Please do not touch.
|
|
4
|
+
|
|
5
|
+
# Apache < 2.3
|
|
6
|
+
<IfModule !mod_authz_core.c>
|
|
7
|
+
Order allow,deny
|
|
8
|
+
Deny from all
|
|
9
|
+
Satisfy All
|
|
10
|
+
</IfModule>
|
|
11
|
+
|
|
12
|
+
# Apache ≥ 2.3
|
|
13
|
+
<IfModule mod_authz_core.c>
|
|
14
|
+
Require all denied
|
|
15
|
+
</IfModule>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file applies Content-Security-Policy (CSP) HTTP headers
|
|
2
|
+
# to directories containing (user uploaded) resources like
|
|
3
|
+
# /fileadmin/ or /uploads/
|
|
4
|
+
|
|
5
|
+
<IfModule mod_headers.c>
|
|
6
|
+
# matching requested *.pdf files only (strict rules block Safari showing PDF documents)
|
|
7
|
+
<FilesMatch "\.pdf$">
|
|
8
|
+
Header set Content-Security-Policy "default-src 'self' 'unsafe-inline'; script-src 'none'; object-src 'self'; plugin-types application/pdf;"
|
|
9
|
+
</FilesMatch>
|
|
10
|
+
# matching anything else, using negative lookbehind pattern
|
|
11
|
+
<FilesMatch "(?<!\.pdf)$">
|
|
12
|
+
Header set Content-Security-Policy "default-src 'self'; script-src 'none'; style-src 'none'; object-src 'none';"
|
|
13
|
+
</FilesMatch>
|
|
14
|
+
|
|
15
|
+
# =================================================================
|
|
16
|
+
# Variations to send CSP header only when it has not be set before.
|
|
17
|
+
# Adjust all `Header set` instructions above
|
|
18
|
+
# Header set Content-Security-Policy "<directives>"
|
|
19
|
+
# with substitutes shown below
|
|
20
|
+
#
|
|
21
|
+
# -----------------------------------------------------------------
|
|
22
|
+
# a) for Apache 2.4 (having `setifempty`)
|
|
23
|
+
# -----------------------------------------------------------------
|
|
24
|
+
# Header setifempty Content-Security-Policy "<directives>"
|
|
25
|
+
#
|
|
26
|
+
# -----------------------------------------------------------------
|
|
27
|
+
# b) for Apache 2.2 (using fallbacks)
|
|
28
|
+
# -----------------------------------------------------------------
|
|
29
|
+
# Header append Content-Security-Policy ""
|
|
30
|
+
# Header edit Content-Security-Policy "^$" "<directives>"
|
|
31
|
+
#
|
|
32
|
+
# =================================================================
|
|
33
|
+
</IfModule>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file restricts access to the fileadmin/user_upload/_import_export_ directory. It is
|
|
2
|
+
# meant to protect temporary files which could contain sensible
|
|
3
|
+
# information. Please do not touch.
|
|
4
|
+
|
|
5
|
+
# Apache < 2.3
|
|
6
|
+
<IfModule !mod_authz_core.c>
|
|
7
|
+
Order allow,deny
|
|
8
|
+
Deny from all
|
|
9
|
+
Satisfy All
|
|
10
|
+
</IfModule>
|
|
11
|
+
|
|
12
|
+
# Apache ≥ 2.3
|
|
13
|
+
<IfModule mod_authz_core.c>
|
|
14
|
+
Require all denied
|
|
15
|
+
</IfModule>
|
|
File without changes
|
|
File without changes
|