Skip to content

Commit ac59fda

Browse files
authored
Merge pull request #353 from itk-dev/feature/1322-security-update
Security update
2 parents 9470de3 + 3223ff0 commit ac59fda

File tree

91 files changed

+3329
-1856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+3329
-1856
lines changed

.docker/templates/default.conf.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ server {
44

55
root ${NGINX_WEB_ROOT};
66

7+
client_max_body_size ${NGINX_MAX_BODY_SIZE};
8+
79
location = /favicon.ico {
810
log_not_found off;
911
access_log off;

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
4343
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
4444

45+
# PHPStan's baseline uses tabs instead of spaces.
46+
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php
47+
4548
# Define binary file attributes.
4649
# - Do not treat them as text.
4750
# - Include binary diff in patches instead of "binary files differ."

.github/workflows/pr.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
- name: Validate composer files
4444
run: |
4545
composer validate composer.json
46+
- name: Check composer file is normalized
47+
run: |
48+
composer install --no-interaction --no-progress
49+
composer normalize composer.json --dry-run
4650
4751
phpcs:
4852
name: PHP - Check Coding Standards

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,4 @@ yarn-error.log
201201
.DS_Store
202202

203203
.env*.local
204+
.twig-cs-fixer.cache

.twig-cs-fixer.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
// @see https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#standard
4+
$config = new TwigCsFixer\Config\Config();
5+
6+
// @see https://github.com/VincentLanglet/Twig-CS-Fixer/pull/134#issuecomment-1756924889
7+
$config->addTokenParser(new Drupal\Core\Template\TwigTransTokenParser());
8+
9+
return $config;

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
88

99
## [Unreleased]
1010

11+
- [PR-353](https://github.com/itk-dev/os2loop/pull/353):
12+
Security update
1113
- [PR-352](https://github.com/itk-dev/os2loop/pull/352):
1214
Fix spacing
1315
- [PR-351](https://github.com/itk-dev/os2loop/pull/351):

README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ for further details.
161161
## Coding standards
162162

163163
```sh
164-
docker compose exec phpfpm composer coding-standards-check
165164
docker compose exec phpfpm composer coding-standards-apply
165+
docker compose exec phpfpm composer coding-standards-check
166166
```
167167

168168
```sh
169169
docker compose run --rm node yarn install
170-
docker compose run --rm node yarn coding-standards-check
171170
docker compose run --rm node yarn coding-standards-apply
171+
docker compose run --rm node yarn coding-standards-check
172172
```
173173

174174
### GitHub Actions
@@ -187,20 +187,6 @@ act -P ubuntu-latest=shivammathur/node:focal pull_request
187187

188188
(cf. <https://github.com/shivammathur/setup-php#local-testing-setup>).
189189

190-
### Twigcs
191-
192-
To run only twigcs:
193-
194-
```sh
195-
docker compose exec phpfpm composer coding-standards-check/twigcs
196-
```
197-
198-
But this is also a part of
199-
200-
```sh
201-
docker compose exec phpfpm composer coding-standards-check
202-
```
203-
204190
## Build theme assets
205191

206192
See

composer.json

Lines changed: 116 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
11
{
22
"name": "os2loop/os2loop",
33
"description": "OS2Loop",
4-
"type": "project",
54
"license": "GPL-2.0-or-later",
5+
"type": "project",
66
"homepage": "https://github.com/os2loop/os2loop",
7-
"repositories": {
8-
"drupal": {
9-
"type": "composer",
10-
"url": "https://packages.drupal.org/8",
11-
"canonical": false
12-
},
13-
"drupal/theme_switcher": {
14-
"type": "vcs",
15-
"url": "https://git.drupalcode.org/project/theme_switcher"
16-
},
17-
"os2loop/os2loop_fixtures": {
18-
"type": "path",
19-
"url": "web/profiles/custom/os2loop/modules/os2loop_fixtures"
20-
},
21-
"drupal/views_flag_refresh": {
22-
"type": "package",
23-
"package": {
24-
"name": "drupal/views_flag_refresh",
25-
"version": "dev-2929394-drupal-8-port",
26-
"type": "drupal-module",
27-
"source": {
28-
"url": "https://git.drupalcode.org/issue/views_flag_refresh-2929394.git",
29-
"type": "git",
30-
"reference": "origin/2929394-drupal-8-port"
31-
}
32-
}
33-
}
34-
},
357
"require": {
368
"php": "^8.2",
379
"composer/installers": "^2.0",
@@ -79,65 +51,107 @@
7951
"drupal/token": "^1.12",
8052
"drupal/token_filter": "^2.0",
8153
"drupal/twig_tweak": "^3.2",
82-
"drupal/view_unpublished": "^1.1",
54+
"drupal/view_unpublished": "^1.2",
8355
"drupal/views_autosubmit": "^1.6",
8456
"drupal/views_data_export": "^1.3",
8557
"drupal/views_flag_refresh": "^1.0",
8658
"drupal/viewsreference": "^2.0@beta",
8759
"drupal/xls_serialization": "^1.3",
8860
"drush/drush": "^12.2"
8961
},
90-
"scripts": {
91-
"code-analysis/phpstan": [
92-
"phpstan analyse --configuration=phpstan.neon --memory-limit=2G"
93-
],
94-
"code-analysis": [
95-
"@code-analysis/phpstan"
96-
],
97-
"coding-standards-check/phpcs": [
98-
"php vendor/bin/phpcs --standard=phpcs.xml.dist"
99-
],
100-
"coding-standards-check/twigcs": [
101-
"twigcs web/profiles/custom/os2loop/themes/os2loop_theme/templates"
102-
],
103-
"coding-standards-check": [
104-
"@coding-standards-check/phpcs",
105-
"@coding-standards-check/twigcs"
106-
],
107-
"coding-standards-apply/phpcs": [
108-
"vendor/bin/phpcbf --standard=phpcs.xml.dist"
109-
],
110-
"coding-standards-apply": [
111-
"@coding-standards-apply/phpcs"
112-
]
62+
"require-dev": {
63+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
64+
"drupal/coder": "^8.3",
65+
"drupal/core-dev": "^10.1",
66+
"drupal/devel": "^5.1",
67+
"ergebnis/composer-normalize": "^2.42",
68+
"kint-php/kint": "^5.0",
69+
"mglaman/phpstan-drupal": "^1.2",
70+
"os2loop/os2loop_fixtures": "*",
71+
"phpspec/prophecy-phpunit": "^2.0",
72+
"phpstan/extension-installer": "^1.3",
73+
"phpstan/phpstan-deprecation-rules": "^1.1",
74+
"vincentlanglet/twig-cs-fixer": "^2.9"
11375
},
11476
"conflict": {
11577
"drupal/drupal": "*"
11678
},
79+
"repositories": {
80+
"drupal": {
81+
"type": "composer",
82+
"url": "https://packages.drupal.org/8",
83+
"canonical": false
84+
},
85+
"drupal/theme_switcher": {
86+
"type": "vcs",
87+
"url": "https://git.drupalcode.org/project/theme_switcher"
88+
},
89+
"os2loop/os2loop_fixtures": {
90+
"type": "path",
91+
"url": "web/profiles/custom/os2loop/modules/os2loop_fixtures"
92+
},
93+
"drupal/views_flag_refresh": {
94+
"type": "package",
95+
"package": {
96+
"name": "drupal/views_flag_refresh",
97+
"type": "drupal-module",
98+
"version": "dev-2929394-drupal-8-port",
99+
"source": {
100+
"type": "git",
101+
"url": "https://git.drupalcode.org/issue/views_flag_refresh-2929394.git",
102+
"reference": "origin/2929394-drupal-8-port"
103+
}
104+
}
105+
}
106+
},
117107
"minimum-stability": "dev",
118108
"prefer-stable": true,
119109
"config": {
120-
"sort-packages": true,
121-
"process-timeout": 0,
122110
"allow-plugins": {
123111
"composer/installers": true,
124112
"cweagans/composer-patches": true,
125113
"dealerdirect/phpcodesniffer-composer-installer": true,
126114
"drupal/console-extend-plugin": true,
127115
"drupal/core-composer-scaffold": true,
128116
"drupal/core-project-message": true,
117+
"ergebnis/composer-normalize": true,
118+
"php-http/discovery": true,
129119
"phpstan/extension-installer": true
130-
}
120+
},
121+
"process-timeout": 0,
122+
"sort-packages": true
131123
},
132124
"extra": {
125+
"drupal-core-project-message": {
126+
"include-keys": [
127+
"homepage",
128+
"support"
129+
],
130+
"post-create-project-cmd-message": [
131+
"<bg=blue;fg=white> </>",
132+
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
133+
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
134+
"<bg=blue;fg=white> </>",
135+
"",
136+
"<bg=yellow;fg=black>Next steps</>:",
137+
" * Install the site: https://www.drupal.org/docs/8/install",
138+
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
139+
" * Get support: https://www.drupal.org/support",
140+
" * Get involved with the Drupal community:",
141+
" https://www.drupal.org/getting-involved",
142+
" * Remove the plugin that prints this message:",
143+
" composer remove drupal/core-project-message"
144+
]
145+
},
133146
"drupal-scaffold": {
134-
"locations": {
135-
"web-root": "web/"
136-
},
137147
"file-mapping": {
138148
"[web-root]/sites/development.services.yml": false
149+
},
150+
"locations": {
151+
"web-root": "web/"
139152
}
140153
},
154+
"enable-patching": true,
141155
"installer-paths": {
142156
"web/core": [
143157
"type:drupal-core"
@@ -170,68 +184,63 @@
170184
"type:os2loop-custom-module"
171185
]
172186
},
173-
"drupal-core-project-message": {
174-
"include-keys": [
175-
"homepage",
176-
"support"
177-
],
178-
"post-create-project-cmd-message": [
179-
"<bg=blue;fg=white> </>",
180-
"<bg=blue;fg=white> Congratulations, you’ve installed the Drupal codebase </>",
181-
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
182-
"<bg=blue;fg=white> </>",
183-
"",
184-
"<bg=yellow;fg=black>Next steps</>:",
185-
" * Install the site: https://www.drupal.org/docs/8/install",
186-
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
187-
" * Get support: https://www.drupal.org/support",
188-
" * Get involved with the Drupal community:",
189-
" https://www.drupal.org/getting-involved",
190-
" * Remove the plugin that prints this message:",
191-
" composer remove drupal/core-project-message"
192-
]
193-
},
194-
"enable-patching": true,
195187
"patches": {
196188
"drupal/core": {
197-
"Disable forced configuration langcode (https://www.drupal.org/project/drupal/issues/3150540)": "https://www.drupal.org/files/issues/2023-05-24/3150540-36.patch",
189+
"Disable forced configuration langcode (https://www.drupal.org/project/drupal/issues/3150540)": "https://www.drupal.org/files/issues/2024-01-25/3150540-40.patch",
198190
"Handle undefined index when using form states (https://www.drupal.org/project/drupal/issues/2700667)": "https://www.drupal.org/files/issues/2020-03-11/2700667-104.patch"
199191
},
200-
"drupal/flag": {
201-
"Implement Migration Paths for Flag 7.x (https://www.drupal.org/project/flag/issues/2409901#comment-13082245)": "https://www.drupal.org/files/issues/2019-04-25/2409901_flag_migration_paths_52.patch",
202-
"Implement Migration Paths for Flag 7.x (https://www.drupal.org/project/flag/issues/2409901#comment-13281955)": "https://www.drupal.org/files/issues/2019-10-02/2409901-60.patch"
203-
},
204-
"drupal/openid_connect": {
205-
"Revoking group access does not reflect on applied roles (https://www.drupal.org/project/openid_connect/issues/3224128)": "https://git.drupalcode.org/project/openid_connect/-/merge_requests/31.diff"
206-
},
207-
"drupal/masquerade": {
208-
"https://www.drupal.org/project/masquerade/issues/2962970#comment-13391256": "https://www.drupal.org/files/issues/2019-12-13/temporary%20unmask%20workaround-2962970-8.patch"
209-
},
210192
"drupal/devel": {
211193
"Public methods are not visible in kint (https://www.drupal.org/project/devel/issues/3112201)": "https://www.drupal.org/files/issues/2022-04-26/devel_3112201_4.patch"
212194
},
213-
"drupal/view_unpublished": {
214-
"Grants are not cached if the user has \"view any unpublished content\" permission (https://www.drupal.org/project/view_unpublished/issues/3226756)": "https://www.drupal.org/files/issues/2021-08-04/view_unpublished-cache_ignored-3226756-2-8.x.patch"
215-
},
216195
"drupal/entity_print": {
217196
"Add page count https://www.drupal.org/project/entity_print/issues/2823430": "https://www.drupal.org/files/issues/2023-07-10/entity_print-dompdf_page_count-2823430-14.patch"
218197
},
219198
"drupal/entity_reference_integrity": {
220199
"https://www.drupal.org/project/entity_reference_integrity/issues/3380250": "https://www.drupal.org/files/issues/2023-08-29/entity_reference_integrity-3380250-5.patch"
200+
},
201+
"drupal/flag": {
202+
"Implement Migration Paths for Flag 7.x (https://www.drupal.org/project/flag/issues/2409901#comment-13082245)": "https://www.drupal.org/files/issues/2019-04-25/2409901_flag_migration_paths_52.patch",
203+
"Implement Migration Paths for Flag 7.x (https://www.drupal.org/project/flag/issues/2409901#comment-13281955)": "https://www.drupal.org/files/issues/2019-10-02/2409901-60.patch"
204+
},
205+
"drupal/masquerade": {
206+
"https://www.drupal.org/project/masquerade/issues/2962970#comment-13391256": "https://www.drupal.org/files/issues/2019-12-13/temporary%20unmask%20workaround-2962970-8.patch"
221207
}
222208
}
223209
},
224-
"require-dev": {
225-
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
226-
"drupal/coder": "^8.3",
227-
"drupal/core-dev": "^10.1",
228-
"drupal/devel": "^5.1",
229-
"friendsoftwig/twigcs": "^6.2",
230-
"kint-php/kint": "^5.0",
231-
"mglaman/phpstan-drupal": "^1.2",
232-
"os2loop/os2loop_fixtures": "*",
233-
"phpspec/prophecy-phpunit": "^2.0",
234-
"phpstan/extension-installer": "^1.3",
235-
"phpstan/phpstan-deprecation-rules": "^1.1"
210+
"scripts": {
211+
"code-analysis": [
212+
"@code-analysis/phpstan"
213+
],
214+
"code-analysis/phpstan": [
215+
"phpstan analyse --configuration=phpstan.neon --memory-limit=2G"
216+
],
217+
"coding-standards-apply": [
218+
"@coding-standards-apply/phpcs",
219+
"@coding-standards-apply/twig-cs-fixer",
220+
"@coding-standards-apply/composer-normalize"
221+
],
222+
"coding-standards-apply/composer-normalize": [
223+
"composer normalize"
224+
],
225+
"coding-standards-apply/phpcs": [
226+
"vendor/bin/phpcbf --standard=phpcs.xml.dist"
227+
],
228+
"coding-standards-apply/twig-cs-fixer": [
229+
"twig-cs-fixer lint --fix web/profiles/custom/os2loop/themes/os2loop_theme/templates"
230+
],
231+
"coding-standards-check": [
232+
"@coding-standards-check/phpcs",
233+
"@coding-standards-check/twig-cs-fixer",
234+
"@coding-standards-check/composer-normalize"
235+
],
236+
"coding-standards-check/composer-normalize": [
237+
"composer normalize --dry-run"
238+
],
239+
"coding-standards-check/phpcs": [
240+
"php vendor/bin/phpcs --standard=phpcs.xml.dist"
241+
],
242+
"coding-standards-check/twig-cs-fixer": [
243+
"twig-cs-fixer lint web/profiles/custom/os2loop/themes/os2loop_theme/templates"
244+
]
236245
}
237246
}

0 commit comments

Comments
 (0)