Skip to content

Commit 82eb383

Browse files
Merge pull request #18658 from MoonE/update-openlayers
Update OpenLayers
2 parents 1e3c7ec + fa206f1 commit 82eb383

File tree

4 files changed

+41
-29
lines changed

4 files changed

+41
-29
lines changed

libraries/classes/Header.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public function getPageTitle(): string
526526
*/
527527
private function getCspHeaders(): array
528528
{
529-
$mapTileUrls = ' *.tile.openstreetmap.org';
529+
$mapTileUrl = ' tile.openstreetmap.org';
530530
$captchaUrl = '';
531531
$cspAllow = $GLOBALS['cfg']['CSPAllow'];
532532

@@ -552,7 +552,7 @@ private function getCspHeaders(): array
552552
$captchaUrl,
553553
$cspAllow,
554554
$cspAllow,
555-
$mapTileUrls,
555+
$mapTileUrl,
556556
$captchaUrl,
557557
);
558558

@@ -562,7 +562,7 @@ private function getCspHeaders(): array
562562
$captchaUrl,
563563
$cspAllow,
564564
$cspAllow,
565-
$mapTileUrls,
565+
$mapTileUrl,
566566
$captchaUrl,
567567
);
568568

@@ -576,7 +576,7 @@ private function getCspHeaders(): array
576576
$cspAllow,
577577
$captchaUrl,
578578
$cspAllow,
579-
$mapTileUrls,
579+
$mapTileUrl,
580580
$captchaUrl,
581581
);
582582

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"js-cookie": "3.0.1",
4242
"locutus.sprintf": "^2.0.14-code-lts.2",
4343
"mini-css-extract-plugin": "^2.5.3",
44-
"ol": "6.15.1",
44+
"ol": "^7.1.0",
4545
"postcss": "^8.4.21",
4646
"postcss-cli": "^10.1.0",
4747
"postcss-loader": "^7.1.0",

test/classes/HeaderTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ public static function providerForTestGetHttpHeaders(): array
195195
'',
196196
'DENY',
197197
'default-src \'self\' ;script-src \'self\' \'unsafe-inline\' \'unsafe-eval\' ;'
198-
. 'style-src \'self\' \'unsafe-inline\' ;img-src \'self\' data: *.tile.openstreetmap.org;'
198+
. 'style-src \'self\' \'unsafe-inline\' ;img-src \'self\' data: tile.openstreetmap.org;'
199199
. 'object-src \'none\';',
200200
'default-src \'self\' ;options inline-script eval-script;referrer no-referrer;'
201-
. 'img-src \'self\' data: *.tile.openstreetmap.org;object-src \'none\';',
201+
. 'img-src \'self\' data: tile.openstreetmap.org;object-src \'none\';',
202202
'default-src \'self\' ;script-src \'self\' \'unsafe-inline\' \'unsafe-eval\';'
203203
. 'referrer no-referrer;style-src \'self\' \'unsafe-inline\' ;'
204-
. 'img-src \'self\' data: *.tile.openstreetmap.org;object-src \'none\';',
204+
. 'img-src \'self\' data: tile.openstreetmap.org;object-src \'none\';',
205205
],
206206
[
207207
'SameOrigin',
@@ -214,15 +214,15 @@ public static function providerForTestGetHttpHeaders(): array
214214
. 'script-src \'self\' \'unsafe-inline\' \'unsafe-eval\' '
215215
. 'captcha.tld csp.tld example.com example.net;'
216216
. 'style-src \'self\' \'unsafe-inline\' captcha.tld csp.tld example.com example.net;'
217-
. 'img-src \'self\' data: example.com example.net *.tile.openstreetmap.org captcha.tld csp.tld ;'
217+
. 'img-src \'self\' data: example.com example.net tile.openstreetmap.org captcha.tld csp.tld ;'
218218
. 'object-src \'none\';',
219219
'default-src \'self\' captcha.tld csp.tld example.com example.net;'
220220
. 'options inline-script eval-script;referrer no-referrer;img-src \'self\' data: example.com '
221-
. 'example.net *.tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
221+
. 'example.net tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
222222
'default-src \'self\' captcha.tld csp.tld example.com example.net;script-src \'self\' '
223223
. 'captcha.tld csp.tld example.com example.net \'unsafe-inline\' \'unsafe-eval\';'
224224
. 'referrer no-referrer;style-src \'self\' \'unsafe-inline\' captcha.tld csp.tld ;'
225-
. 'img-src \'self\' data: example.com example.net *.tile.openstreetmap.org captcha.tld csp.tld ;'
225+
. 'img-src \'self\' data: example.com example.net tile.openstreetmap.org captcha.tld csp.tld ;'
226226
. 'object-src \'none\';',
227227
],
228228
[
@@ -235,14 +235,14 @@ public static function providerForTestGetHttpHeaders(): array
235235
'default-src \'self\' captcha.tld csp.tld ;'
236236
. 'script-src \'self\' \'unsafe-inline\' \'unsafe-eval\' captcha.tld csp.tld ;'
237237
. 'style-src \'self\' \'unsafe-inline\' captcha.tld csp.tld ;'
238-
. 'img-src \'self\' data: *.tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
238+
. 'img-src \'self\' data: tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
239239
'default-src \'self\' captcha.tld csp.tld ;'
240240
. 'options inline-script eval-script;referrer no-referrer;'
241-
. 'img-src \'self\' data: *.tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
241+
. 'img-src \'self\' data: tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
242242
'default-src \'self\' captcha.tld csp.tld ;'
243243
. 'script-src \'self\' captcha.tld csp.tld \'unsafe-inline\' \'unsafe-eval\';'
244244
. 'referrer no-referrer;style-src \'self\' \'unsafe-inline\' captcha.tld csp.tld ;'
245-
. 'img-src \'self\' data: *.tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
245+
. 'img-src \'self\' data: tile.openstreetmap.org captcha.tld csp.tld ;object-src \'none\';',
246246
],
247247
];
248248
}

yarn.lock

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,6 +2607,11 @@ domexception@^4.0.0:
26072607
dependencies:
26082608
webidl-conversions "^7.0.0"
26092609

2610+
earcut@^2.2.3:
2611+
version "2.2.4"
2612+
resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.2.4.tgz#6d02fd4d68160c114825d06890a92ecaae60343a"
2613+
integrity sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==
2614+
26102615
electron-to-chromium@^1.4.477:
26112616
version "1.4.502"
26122617
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.502.tgz#531cda8774813d97d6cfa2fb9d8ee3e2c75851fa"
@@ -2997,16 +3002,16 @@ gensync@^1.0.0-beta.2:
29973002
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
29983003
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
29993004

3000-
geotiff@2.0.4:
3001-
version "2.0.4"
3002-
resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.0.4.tgz#d6f231fdd76186aba21c61823ed759fcbf5d4f86"
3003-
integrity sha512-aG8h9bJccGusioPsEWsEqx8qdXpZN71A20WCvRKGxcnHSOWLKmC5ZmsAmodfxb9TRQvs+89KikGuPzxchhA+Uw==
3005+
geotiff@^2.0.7:
3006+
version "2.0.7"
3007+
resolved "https://registry.yarnpkg.com/geotiff/-/geotiff-2.0.7.tgz#358e578233af70bfb0b4dee62d599ad78fc5cfca"
3008+
integrity sha512-FKvFTNowMU5K6lHYY2f83d4lS2rsCNdpUC28AX61x9ZzzqPNaWFElWv93xj0eJFaNyOYA63ic5OzJ88dHpoA5Q==
30043009
dependencies:
30053010
"@petamoriken/float16" "^3.4.7"
30063011
lerc "^3.0.0"
3007-
lru-cache "^6.0.0"
30083012
pako "^2.0.4"
30093013
parse-headers "^2.0.2"
3014+
quick-lru "^6.1.1"
30103015
web-worker "^1.2.0"
30113016
xml-utils "^1.0.2"
30123017

@@ -4269,21 +4274,23 @@ nwsapi@^2.2.2:
42694274
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30"
42704275
integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==
42714276

4272-
ol-mapbox-style@^8.0.5:
4273-
version "8.2.1"
4274-
resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-8.2.1.tgz#0f0c252b6495853a137d7e4dd3f915fab664b356"
4275-
integrity sha512-3kBBuZC627vDL8vnUdfVbCbfkhkcZj2kXPHQcuLhC4JJEA+XkEVEtEde8x8+AZctRbHwBkSiubTPaRukgLxIRw==
4277+
ol-mapbox-style@^10.1.0:
4278+
version "10.7.0"
4279+
resolved "https://registry.yarnpkg.com/ol-mapbox-style/-/ol-mapbox-style-10.7.0.tgz#8837912da2a16fbd22992d76cbc4f491c838b973"
4280+
integrity sha512-S/UdYBuOjrotcR95Iq9AejGYbifKeZE85D9VtH11ryJLQPTZXZSW1J5bIXcr4AlAH6tyjPPHTK34AdkwB32Myw==
42764281
dependencies:
42774282
"@mapbox/mapbox-gl-style-spec" "^13.23.1"
42784283
mapbox-to-css-font "^2.4.1"
4284+
ol "^7.3.0"
42794285

4280-
ol@6.15.1:
4281-
version "6.15.1"
4282-
resolved "https://registry.yarnpkg.com/ol/-/ol-6.15.1.tgz#364f459939ef71f970b2376a821a896529f65e3a"
4283-
integrity sha512-ZG2CKTpJ8Q+tPywYysVwPk+yevwJzlbwjRKhoCvd7kLVWMbfBl1O/+Kg/yrZZrhG9FNXbFH4GeOZ5yVRqo3P4w==
4286+
ol@^7.1.0, ol@^7.3.0:
4287+
version "7.5.1"
4288+
resolved "https://registry.yarnpkg.com/ol/-/ol-7.5.1.tgz#76e7a8b2cabf36124ce3123d22af08e7c4e86087"
4289+
integrity sha512-CFXDhO8YdQt7I+zwrGYSONo/ZM2oLr7vUvxqpLEUyy+USaQjUeE8L6FBOWIPboopGVhnSVYd5hdEirn9ifKBZQ==
42844290
dependencies:
4285-
geotiff "2.0.4"
4286-
ol-mapbox-style "^8.0.5"
4291+
earcut "^2.2.3"
4292+
geotiff "^2.0.7"
4293+
ol-mapbox-style "^10.1.0"
42874294
pbf "3.2.1"
42884295
rbush "^3.0.1"
42894296

@@ -4646,6 +4653,11 @@ quick-lru@^5.1.1:
46464653
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"
46474654
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
46484655

4656+
quick-lru@^6.1.1:
4657+
version "6.1.1"
4658+
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-6.1.1.tgz#f8e5bf9010376c126c80c1a62827a526c0e60adf"
4659+
integrity sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==
4660+
46494661
quickselect@^2.0.0:
46504662
version "2.0.0"
46514663
resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018"

0 commit comments

Comments
 (0)