node-red-contrib-web-worldmap 4.6.4 → 4.6.5
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/CHANGELOG.md +1 -0
- package/README.md +1 -0
- package/node_modules/cookie/HISTORY.md +10 -5
- package/node_modules/cookie/README.md +63 -48
- package/node_modules/cookie/index.js +5 -1
- package/node_modules/cookie/package.json +5 -5
- package/node_modules/express/History.md +19 -1
- package/node_modules/express/lib/response.js +12 -3
- package/node_modules/express/package.json +2 -2
- package/package.json +2 -2
- package/worldmap/worldmap.js +7 -6
- package/worldmap.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v4.6.5 - Let geojson allow for generic overrides with .icon and .layer.
|
|
3
4
|
- v4.6.4 - Fix deletion of layers logic to actually fully remove points.
|
|
4
5
|
- v4.6.3 - Fix sending of layer events when not wanted. Issue #262
|
|
5
6
|
- v4.6.2 - Fix multiple use of contextmenu feedback. Issue #259
|
package/README.md
CHANGED
|
@@ -13,6 +13,7 @@ Feel free to [
|
|
113
|
+
attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
|
|
114
|
+
`Partitioned` attribute is not set.
|
|
115
|
+
|
|
116
|
+
**note** This is an attribute that has not yet been fully standardized, and may change in the future.
|
|
117
|
+
This also means many clients may ignore this attribute until they understand it.
|
|
118
|
+
|
|
119
|
+
More information about can be found in [the proposal](https://github.com/privacycg/CHIPS).
|
|
120
|
+
|
|
110
121
|
##### path
|
|
111
122
|
|
|
112
123
|
Specifies the value for the [`Path` `Set-Cookie` attribute][rfc-6265-5.2.4]. By default, the path
|
|
@@ -212,49 +223,52 @@ $ npm test
|
|
|
212
223
|
```
|
|
213
224
|
$ npm run bench
|
|
214
225
|
|
|
215
|
-
> cookie@0.
|
|
226
|
+
> cookie@0.5.0 bench
|
|
216
227
|
> node benchmark/index.js
|
|
217
228
|
|
|
218
|
-
node@
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
node@18.18.2
|
|
230
|
+
acorn@8.10.0
|
|
231
|
+
ada@2.6.0
|
|
232
|
+
ares@1.19.1
|
|
222
233
|
brotli@1.0.9
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
cldr@43.1
|
|
235
|
+
icu@73.2
|
|
236
|
+
llhttp@6.0.11
|
|
237
|
+
modules@108
|
|
238
|
+
napi@9
|
|
239
|
+
nghttp2@1.57.0
|
|
240
|
+
nghttp3@0.7.0
|
|
241
|
+
ngtcp2@0.8.1
|
|
242
|
+
openssl@3.0.10+quic
|
|
243
|
+
simdutf@3.2.14
|
|
244
|
+
tz@2023c
|
|
245
|
+
undici@5.26.3
|
|
246
|
+
unicode@15.0
|
|
247
|
+
uv@1.44.2
|
|
248
|
+
uvwasi@0.0.18
|
|
249
|
+
v8@10.2.154.26-node.26
|
|
250
|
+
zlib@1.2.13.1-motley
|
|
235
251
|
|
|
236
252
|
> node benchmark/parse-top.js
|
|
237
253
|
|
|
238
254
|
cookie.parse - top sites
|
|
239
255
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
parse accounts.google.com x 2,
|
|
243
|
-
parse apple.com x 2,
|
|
244
|
-
parse cloudflare.com x 2,
|
|
245
|
-
parse docs.google.com x 2,
|
|
246
|
-
parse drive.google.com x 2,
|
|
247
|
-
parse en.wikipedia.org x
|
|
248
|
-
parse linkedin.com x
|
|
249
|
-
parse maps.google.com x 1,
|
|
250
|
-
parse microsoft.com x
|
|
251
|
-
parse play.google.com x 2,
|
|
252
|
-
parse
|
|
253
|
-
parse
|
|
254
|
-
parse
|
|
255
|
-
parse
|
|
256
|
-
parse youtu.be x 937,428 ops/sec ±1.47% (190 runs sampled)
|
|
257
|
-
parse youtube.com x 963,878 ops/sec ±0.59% (190 runs sampled)
|
|
256
|
+
14 tests completed.
|
|
257
|
+
|
|
258
|
+
parse accounts.google.com x 2,588,913 ops/sec ±0.74% (186 runs sampled)
|
|
259
|
+
parse apple.com x 2,370,002 ops/sec ±0.69% (186 runs sampled)
|
|
260
|
+
parse cloudflare.com x 2,213,102 ops/sec ±0.88% (188 runs sampled)
|
|
261
|
+
parse docs.google.com x 2,194,157 ops/sec ±1.03% (184 runs sampled)
|
|
262
|
+
parse drive.google.com x 2,265,084 ops/sec ±0.79% (187 runs sampled)
|
|
263
|
+
parse en.wikipedia.org x 457,099 ops/sec ±0.81% (186 runs sampled)
|
|
264
|
+
parse linkedin.com x 504,407 ops/sec ±0.89% (186 runs sampled)
|
|
265
|
+
parse maps.google.com x 1,230,959 ops/sec ±0.98% (186 runs sampled)
|
|
266
|
+
parse microsoft.com x 926,294 ops/sec ±0.88% (184 runs sampled)
|
|
267
|
+
parse play.google.com x 2,311,338 ops/sec ±0.83% (185 runs sampled)
|
|
268
|
+
parse support.google.com x 1,508,850 ops/sec ±0.86% (186 runs sampled)
|
|
269
|
+
parse www.google.com x 1,022,582 ops/sec ±1.32% (182 runs sampled)
|
|
270
|
+
parse youtu.be x 332,136 ops/sec ±1.02% (185 runs sampled)
|
|
271
|
+
parse youtube.com x 323,833 ops/sec ±0.77% (183 runs sampled)
|
|
258
272
|
|
|
259
273
|
> node benchmark/parse.js
|
|
260
274
|
|
|
@@ -262,12 +276,12 @@ $ npm run bench
|
|
|
262
276
|
|
|
263
277
|
6 tests completed.
|
|
264
278
|
|
|
265
|
-
simple x
|
|
266
|
-
decode x
|
|
267
|
-
unquote x 2,
|
|
268
|
-
duplicates x
|
|
269
|
-
10 cookies x
|
|
270
|
-
100 cookies x 22,
|
|
279
|
+
simple x 3,214,032 ops/sec ±1.61% (183 runs sampled)
|
|
280
|
+
decode x 587,237 ops/sec ±1.16% (187 runs sampled)
|
|
281
|
+
unquote x 2,954,618 ops/sec ±1.35% (183 runs sampled)
|
|
282
|
+
duplicates x 857,008 ops/sec ±0.89% (187 runs sampled)
|
|
283
|
+
10 cookies x 292,133 ops/sec ±0.89% (187 runs sampled)
|
|
284
|
+
100 cookies x 22,610 ops/sec ±0.68% (187 runs sampled)
|
|
271
285
|
```
|
|
272
286
|
|
|
273
287
|
## References
|
|
@@ -275,6 +289,7 @@ $ npm run bench
|
|
|
275
289
|
- [RFC 6265: HTTP State Management Mechanism][rfc-6265]
|
|
276
290
|
- [Same-site Cookies][rfc-6265bis-09-5.4.7]
|
|
277
291
|
|
|
292
|
+
[rfc-cutler-httpbis-partitioned-cookies]: https://tools.ietf.org/html/draft-cutler-httpbis-partitioned-cookies/
|
|
278
293
|
[rfc-west-cookie-priority-00-4.1]: https://tools.ietf.org/html/draft-west-cookie-priority-00#section-4.1
|
|
279
294
|
[rfc-6265bis-09-5.4.7]: https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-09#section-5.4.7
|
|
280
295
|
[rfc-6265]: https://tools.ietf.org/html/rfc6265
|
|
@@ -291,12 +306,12 @@ $ npm run bench
|
|
|
291
306
|
|
|
292
307
|
[MIT](LICENSE)
|
|
293
308
|
|
|
309
|
+
[ci-image]: https://badgen.net/github/checks/jshttp/cookie/master?label=ci
|
|
310
|
+
[ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
|
|
294
311
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
|
|
295
312
|
[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
|
|
296
|
-
[
|
|
297
|
-
[
|
|
298
|
-
[node-version-image]: https://badgen.net/npm/node/cookie
|
|
299
|
-
[node-version-url]: https://nodejs.org/en/download
|
|
313
|
+
[node-image]: https://badgen.net/npm/node/cookie
|
|
314
|
+
[node-url]: https://nodejs.org/en/download
|
|
300
315
|
[npm-downloads-image]: https://badgen.net/npm/dm/cookie
|
|
301
316
|
[npm-url]: https://npmjs.org/package/cookie
|
|
302
317
|
[npm-version-image]: https://badgen.net/npm/v/cookie
|
|
@@ -172,6 +172,10 @@ function serialize(name, val, options) {
|
|
|
172
172
|
str += '; Secure';
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
if (opt.partitioned) {
|
|
176
|
+
str += '; Partitioned'
|
|
177
|
+
}
|
|
178
|
+
|
|
175
179
|
if (opt.priority) {
|
|
176
180
|
var priority = typeof opt.priority === 'string'
|
|
177
181
|
? opt.priority.toLowerCase()
|
|
@@ -233,7 +237,7 @@ function decode (str) {
|
|
|
233
237
|
/**
|
|
234
238
|
* URL-encode value.
|
|
235
239
|
*
|
|
236
|
-
* @param {string}
|
|
240
|
+
* @param {string} val
|
|
237
241
|
* @returns {string}
|
|
238
242
|
*/
|
|
239
243
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cookie",
|
|
3
3
|
"description": "HTTP server cookie parsing and serialization",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"author": "Roman Shtylman <shtylman@gmail.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>"
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"beautify-benchmark": "0.2.4",
|
|
17
17
|
"benchmark": "2.1.4",
|
|
18
|
-
"eslint": "
|
|
19
|
-
"eslint-plugin-markdown": "
|
|
20
|
-
"mocha": "
|
|
18
|
+
"eslint": "8.53.0",
|
|
19
|
+
"eslint-plugin-markdown": "3.0.1",
|
|
20
|
+
"mocha": "10.2.0",
|
|
21
21
|
"nyc": "15.1.0",
|
|
22
22
|
"safe-buffer": "5.2.1",
|
|
23
|
-
"top-sites": "1.1.
|
|
23
|
+
"top-sites": "1.1.194"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"HISTORY.md",
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.19.2 / 2024-03-25
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
* Improved fix for open redirect allow list bypass
|
|
5
|
+
|
|
6
|
+
4.19.1 / 2024-03-20
|
|
7
|
+
==========
|
|
8
|
+
|
|
9
|
+
* Allow passing non-strings to res.location with new encoding handling checks
|
|
10
|
+
|
|
11
|
+
4.19.0 / 2024-03-20
|
|
12
|
+
==========
|
|
13
|
+
|
|
14
|
+
* Prevent open redirect allow list bypass due to encodeurl
|
|
15
|
+
* deps: cookie@0.6.0
|
|
16
|
+
|
|
17
|
+
4.18.3 / 2024-02-29
|
|
2
18
|
==========
|
|
3
19
|
|
|
4
20
|
* Fix routing requests without method
|
|
@@ -6,6 +22,8 @@
|
|
|
6
22
|
- Fix strict json error message on Node.js 19+
|
|
7
23
|
- deps: content-type@~1.0.5
|
|
8
24
|
- deps: raw-body@2.5.2
|
|
25
|
+
* deps: cookie@0.6.0
|
|
26
|
+
- Add `partitioned` option
|
|
9
27
|
|
|
10
28
|
4.18.2 / 2022-10-08
|
|
11
29
|
===================
|
|
@@ -55,6 +55,7 @@ module.exports = res
|
|
|
55
55
|
*/
|
|
56
56
|
|
|
57
57
|
var charsetRegExp = /;\s*charset\s*=/;
|
|
58
|
+
var schemaAndHostRegExp = /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:)?\/\/[^\\\/\?]+/;
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* Set status `code`.
|
|
@@ -904,15 +905,23 @@ res.cookie = function (name, value, options) {
|
|
|
904
905
|
*/
|
|
905
906
|
|
|
906
907
|
res.location = function location(url) {
|
|
907
|
-
var loc
|
|
908
|
+
var loc;
|
|
908
909
|
|
|
909
910
|
// "back" is an alias for the referrer
|
|
910
911
|
if (url === 'back') {
|
|
911
912
|
loc = this.req.get('Referrer') || '/';
|
|
913
|
+
} else {
|
|
914
|
+
loc = String(url);
|
|
912
915
|
}
|
|
913
916
|
|
|
914
|
-
|
|
915
|
-
|
|
917
|
+
var m = schemaAndHostRegExp.exec(loc);
|
|
918
|
+
var pos = m ? m[0].length + 1 : 0;
|
|
919
|
+
|
|
920
|
+
// Only encode after host to avoid invalid encoding which can introduce
|
|
921
|
+
// vulnerabilities (e.g. `\\` to `%5C`).
|
|
922
|
+
loc = loc.slice(0, pos) + encodeUrl(loc.slice(pos));
|
|
923
|
+
|
|
924
|
+
return this.set('Location', loc);
|
|
916
925
|
};
|
|
917
926
|
|
|
918
927
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "express",
|
|
3
3
|
"description": "Fast, unopinionated, minimalist web framework",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.19.2",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Aaron Heckmann <aaron.heckmann+github@gmail.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"body-parser": "1.20.2",
|
|
34
34
|
"content-disposition": "0.5.4",
|
|
35
35
|
"content-type": "~1.0.4",
|
|
36
|
-
"cookie": "0.
|
|
36
|
+
"cookie": "0.6.0",
|
|
37
37
|
"cookie-signature": "1.0.6",
|
|
38
38
|
"debug": "2.6.9",
|
|
39
39
|
"depd": "2.0.0",
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.5",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@turf/bezier-spline": "~6.5.0",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
8
|
"compression": "^1.7.4",
|
|
9
|
-
"express": "^4.
|
|
9
|
+
"express": "^4.19.2",
|
|
10
10
|
"sockjs": "~0.3.24"
|
|
11
11
|
},
|
|
12
12
|
"bundledDependencies": [
|
package/worldmap/worldmap.js
CHANGED
|
@@ -150,10 +150,10 @@ var handleData = function(data) {
|
|
|
150
150
|
|
|
151
151
|
// handle raw geojson type msg
|
|
152
152
|
if (data.hasOwnProperty("type") && data.type.indexOf("Feature") === 0) {
|
|
153
|
-
if (data
|
|
154
|
-
doGeojson(data.properties.title,data)
|
|
153
|
+
if (data?.properties?.title) {
|
|
154
|
+
doGeojson(data.properties.title,data,data?.layer,data?.options,data?.icon) // name, geojson, layer, options, icon
|
|
155
155
|
}
|
|
156
|
-
else { doGeojson("geojson",data); }
|
|
156
|
+
else { doGeojson("geojson",data,data?.layer,data?.options,data?.icon); }
|
|
157
157
|
}
|
|
158
158
|
// handle TAK json (from tak-ingest node or fastxml node)
|
|
159
159
|
else if (data.hasOwnProperty("event") && data.event.hasOwnProperty("point")) {
|
|
@@ -3084,7 +3084,7 @@ function doCommand(cmd) {
|
|
|
3084
3084
|
}
|
|
3085
3085
|
|
|
3086
3086
|
// handle any incoming GEOJSON directly - may style badly
|
|
3087
|
-
function doGeojson(n,g,l,o) { // name, geojson, layer, options
|
|
3087
|
+
function doGeojson(n,g,l,o,i) { // name, geojson, layer, options, icon
|
|
3088
3088
|
var lay = l ?? g.name ?? "unknown";
|
|
3089
3089
|
// if (!basemaps[lay]) {
|
|
3090
3090
|
var opt = { style: function(feature) {
|
|
@@ -3132,13 +3132,14 @@ function doGeojson(n,g,l,o) { // name, geojson, layer, options
|
|
|
3132
3132
|
additionalInformation:feature.properties.modifier,
|
|
3133
3133
|
size:25
|
|
3134
3134
|
});
|
|
3135
|
+
var anc = myMarker.getAnchor();
|
|
3135
3136
|
if (myMarker.hasOwnProperty("metadata") && myMarker.metadata.hasOwnProperty("echelon")) {
|
|
3136
3137
|
var sz = iconSz[myMarker.metadata.echelon];
|
|
3137
3138
|
myMarker.setOptions({size:sz});
|
|
3138
3139
|
}
|
|
3139
3140
|
myMarker = L.icon({
|
|
3140
3141
|
iconUrl: myMarker.toDataURL(),
|
|
3141
|
-
iconAnchor: [
|
|
3142
|
+
iconAnchor: [anc.x, anc.y],
|
|
3142
3143
|
className: "natoicon",
|
|
3143
3144
|
});
|
|
3144
3145
|
}
|
|
@@ -3156,7 +3157,7 @@ function doGeojson(n,g,l,o) { // name, geojson, layer, options
|
|
|
3156
3157
|
}
|
|
3157
3158
|
else {
|
|
3158
3159
|
myMarker = L.VectorMarkers.icon({
|
|
3159
|
-
icon: feature.properties["marker-symbol"] ?? "circle",
|
|
3160
|
+
icon: feature.properties["marker-symbol"] ?? i ?? "circle",
|
|
3160
3161
|
markerColor: (feature.properties["marker-color"] ?? "#910000"),
|
|
3161
3162
|
prefix: 'fa',
|
|
3162
3163
|
iconColor: 'white'
|
package/worldmap.js
CHANGED
|
@@ -129,7 +129,7 @@ module.exports = function(RED) {
|
|
|
129
129
|
if (node.name) { c.toptitle = node.name; }
|
|
130
130
|
//console.log("INIT",c)
|
|
131
131
|
client.write(JSON.stringify({command:c}));
|
|
132
|
-
for (var p=0; p<pmtiles.length; p++) {
|
|
132
|
+
for (var p=0; p < pmtiles.length; p++) {
|
|
133
133
|
fs.symlink(RED.settings.userDir+'/'+pmtiles[p], __dirname+'/worldmap/'+pmtiles[p], 'file', (err) => {
|
|
134
134
|
if (err) {
|
|
135
135
|
if (err.code !== "EEXIST") { console.log(err); }
|
|
@@ -200,7 +200,6 @@ module.exports = function(RED) {
|
|
|
200
200
|
if (msg.payload.ttl && msg.payload.ttl < t) { t = msg.payload.ttl; }
|
|
201
201
|
allPoints[msg.payload.name].tout = setTimeout( function() { delete allPoints[msg.payload.name] }, t * 1000 );
|
|
202
202
|
}
|
|
203
|
-
|
|
204
203
|
if (msg?.payload?.command?.map?.delete) {
|
|
205
204
|
var ddd = msg.payload.command.map.delete;
|
|
206
205
|
if (!Array.isArray(ddd)) { ddd = [cmd.map.delete]; }
|
|
@@ -214,8 +213,8 @@ module.exports = function(RED) {
|
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
215
|
}
|
|
217
|
-
|
|
218
216
|
});
|
|
217
|
+
|
|
219
218
|
node.on("close", function() {
|
|
220
219
|
for (var c in clients) {
|
|
221
220
|
if (clients.hasOwnProperty(c)) {
|
|
@@ -232,6 +231,7 @@ module.exports = function(RED) {
|
|
|
232
231
|
}
|
|
233
232
|
node.status({});
|
|
234
233
|
});
|
|
234
|
+
|
|
235
235
|
sockets[node.path].on('connection', callback);
|
|
236
236
|
}
|
|
237
237
|
var WorldMap = function(n) {
|