Skip to content

Commit ce9f22a

Browse files
committed
Merge branch 'master' into spring7
2 parents 7542f14 + 3082f80 commit ce9f22a

58 files changed

Lines changed: 1944 additions & 252 deletions

Some content is hidden

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

.clabot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"NielsMorck",
3232
"jve-nordiq",
3333
"tha-nordiq",
34+
"oskarbh7",
3435
"fni18300",
3536
"OPGuillaume",
3637
"Mbayyari",
@@ -40,6 +41,7 @@
4041
"cmotadev",
4142
"brynsofz",
4243
"jlo-arxit",
44+
"endorria",
4345
"huntsmarinho",
4446
"aseques",
4547
"jwkaltz",

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,11 @@ assignees: ''
3939

4040
## Other useful information
4141
<!-- error stack trace, screenshot, videos, or link to repository code are welcome -->
42+
43+
## Security vulnerabilities
44+
45+
Do not report security vulnerabilities in public issues.
46+
47+
If you believe you have found a vulnerability in MapStore, please use GitHub private vulnerability reporting or contact the security address listed in `SECURITY.md`.
48+
49+

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,10 @@ assignees: ''
1616
- [ ] Developer Guide
1717

1818
## Other useful information
19+
20+
## Security vulnerabilities
21+
22+
Do not report security vulnerabilities in public issues.
23+
24+
If you believe you have found a vulnerability in MapStore, please use GitHub private vulnerability reporting or contact the security address listed in `SECURITY.md`.
25+

.github/ISSUE_TEMPLATE/new_feature.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ assignees: ''
1818
- [ ]
1919

2020
## Other useful information
21+
22+
## Security vulnerabilities
23+
24+
Do not report security vulnerabilities in public issues.
25+
26+
If you believe you have found a vulnerability in MapStore, please use GitHub private vulnerability reporting or contact the security address listed in `SECURITY.md`.

.github/ISSUE_TEMPLATE/other.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ assignees: ''
2222

2323

2424
## Other useful information
25+
26+
## Security vulnerabilities
27+
28+
Do not report security vulnerabilities in public issues.
29+
30+
If you believe you have found a vulnerability in MapStore, please use GitHub private vulnerability reporting or contact the security address listed in `SECURITY.md`.
31+

SECURITY.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Security Policy
2+
3+
MapStore maintainers take security vulnerabilities seriously.
4+
Please do not report suspected security vulnerabilities through public GitHub issues, public pull requests, public discussions, mailing lists, or other public channels.
5+
6+
## Supported versions
7+
8+
MapStore security fixes are normally prepared for the currently maintained release lines.
9+
10+
| Version | Supported |
11+
| ------------------------------------------------- | ---------------------- |
12+
| Latest stable release line | Supported |
13+
| Active maintenance release line, where applicable | Supported |
14+
| Older or archived releases | Not normally supported |
15+
16+
Users running older MapStore versions are encouraged to upgrade to a supported release. If your organization requires security fixes for an older version, please contact GeoSolutions or your MapStore support provider to discuss feasibility.
17+
18+
## Reporting a vulnerability
19+
20+
Please report suspected vulnerabilities privately using one of the following channels.
21+
22+
### GitHub private vulnerability reporting
23+
24+
Use the repository security page and submit a private vulnerability report:
25+
26+
[https://github.com/geosolutions-it/MapStore2/security/advisories/new](https://github.com/geosolutions-it/MapStore2/security/advisories/new)
27+
28+
This is the preferred channel when available, because it allows maintainers and the reporter to coordinate privately, prepare a fix, request or associate a CVE where appropriate, and publish a GitHub Security Advisory after release.
29+
30+
### Email
31+
32+
If GitHub private vulnerability reporting is unavailable, or if email is more appropriate, contact:
33+
34+
[infosec@geosolutionsgroup.com](mailto:infosec@geosolutionsgroup.com)
35+
36+
Please include as much of the following information as possible:
37+
38+
* affected MapStore version, release line, commit, or deployment profile;
39+
* affected component, endpoint, plugin, or configuration;
40+
* steps to reproduce the issue;
41+
* proof-of-concept details, preferably against a local or test instance;
42+
* expected and actual behavior;
43+
* potential impact;
44+
* whether the issue has already been disclosed to anyone else;
45+
* whether you would like public credit in the advisory.
46+
47+
Please do not test against third-party systems or production deployments unless you have explicit authorization.
48+
49+
## Coordinated vulnerability disclosure
50+
51+
MapStore follows a coordinated vulnerability disclosure process.
52+
53+
1. The report is received through a private channel.
54+
2. The maintainers acknowledge receipt, normally within 5 business days.
55+
3. The maintainers privately verify the vulnerability and assess severity, impact, affected versions, and exploitability.
56+
4. If the report is valid, the maintainers prepare a fix, regression tests, mitigation guidance where applicable, and backports to supported release lines where feasible.
57+
5. A GitHub Security Advisory may be used to coordinate the fix, request or associate a CVE, credit the reporter, and prepare public advisory text.
58+
6. Fixed releases are published before exploit details are disclosed publicly, unless the vulnerability is already public or actively exploited.
59+
7. The advisory is published with affected versions, fixed versions, severity, mitigation or workaround instructions, and upgrade guidance.
60+
61+
We ask reporters to keep vulnerability details private until a fixed release and advisory are available. If public disclosure
62+
is required for external reasons, please coordinate the timing with the maintainers whenever possible.
63+
64+
## Scope
65+
66+
This policy covers vulnerabilities in MapStore source code, default configurations, official build artifacts, and official documentation where the documentation causes an insecure deployment pattern.
67+
68+
Issues in third-party dependencies may be reported if they materially affect MapStore users, but they may also need to be coordinated with the upstream dependency maintainers.
69+
70+
## Safe harbor
71+
72+
We will not pursue legal action against security researchers who make a good-faith effort to comply with this policy, avoid privacy violations, avoid service disruption, avoid data destruction, and report vulnerabilities privately.

docs/developer-guide/mapstore-migration-guide.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,31 @@ This is a list of things to check if you want to update from a previous version
2222

2323
## Migration from 2026.01.02 to 2026.02.00
2424

25+
### Custom map resolutions moved from `new.json` to the `CRSSelector` plugin
26+
27+
Custom map resolutions used to be declared in the default map configuration (`new.json`, or the project-level equivalent) under `mapOptions.view.resolutions`. That location was tied to a single projection and was not kept in sync when the CRS was changed at runtime, which could leave saved maps with a projection that did not match the persisted resolutions.
28+
29+
Custom resolutions are declared **per CRS** in the `CRSSelector` plugin configuration in `localConfig.json`, keyed by SRS code:
30+
31+
```json
32+
{
33+
"name": "CRSSelector",
34+
"cfg": {
35+
"customResolutions": {
36+
"EPSG:3003": [2366, 1183, 591, 295, 147, 73, 36, 18, 9, 4, 2, 1, 0.5, 0.28, 0.14, 0.07, 0.035, 0.018],
37+
"EPSG:4326": [0.7, 0.35, 0.175, 0.0875, 0.04375, 0.021875, 0.010986, 0.0054931]
38+
}
39+
}
40+
}
41+
```
42+
43+
When the user switches the map CRS, the matching list of resolutions is applied to the map. If a CRS has no entry, the resolutions are computed from the projection extent. In either case the chosen list is saved together with the map so that, on reload, the CRS and the resolutions remain aligned.
44+
45+
#### Migration steps
46+
47+
1. Remove `mapOptions.view.resolutions` from `new.json` (and from any custom default map config used by the project). Any value left there is dropped on the next save.
48+
2. Add an equivalent `customResolutions` block to the `CRSSelector` plugin entry in `localConfig.json`, keyed by the SRS the resolutions were originally designed for.
49+
2550
### print-lib updated to 2.3.5
2651

2752
In your project, you should update the `print-lib.version` property from version `2.3.4` to version `2.3.5` in the root `pom.xml`.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"@znemz/cesium-navigation": "4.0.0",
139139
"ajv": "8.18.0",
140140
"assert": "2.0.0",
141-
"axios": "0.30.3",
141+
"axios": "0.32.0",
142142
"bootstrap": "3.4.1",
143143
"buffer": "6.0.3",
144144
"canvas-to-blob": "0.0.0",

utility/build/postInstall.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ const nodeModules = [
2020
}
2121
];
2222

23+
// Patch for axios-mock-adapter to support null-prototype headers introduced in axios 0.32.0.
24+
// Remove when https://github.com/ctimmerm/axios-mock-adapter/issues/415 is fixed and released.
25+
function patchAxiosMockAdapter(nodeModulesPath) {
26+
const filePath = path.resolve(nodeModulesPath, 'axios-mock-adapter/src/handle_request.js');
27+
if (!fs.existsSync(filePath)) return;
28+
const original = 'config.headers.constructor.name === "AxiosHeaders"';
29+
const patched = 'config.headers?.constructor?.name === "AxiosHeaders"';
30+
const content = fs.readFileSync(filePath, 'utf8');
31+
if (content.includes(original)) {
32+
console.log('* patching axios-mock-adapter handle_request.js (null-prototype compat)');
33+
fs.writeFileSync(filePath, content.replace(original, patched), 'utf8');
34+
}
35+
}
36+
2337
function removeModules(nodeModulesPath) {
2438
const removeModulesList = [
2539
'leaflet-simple-graticule/node_modules'
@@ -45,6 +59,7 @@ function removeModules(nodeModulesPath) {
4559
nodeModules.forEach((nodeModule) => {
4660
if (fs.existsSync(nodeModule.path) && nodeModule.valid) {
4761
console.log('remove in node_modules path', nodeModule.path);
48-
removeModules(nodeModule.path)
62+
removeModules(nodeModule.path);
63+
patchAxiosMockAdapter(nodeModule.path);
4964
}
5065
});

web/client/api/GeoNode.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import { getConfigProp } from '../utils/ConfigUtils';
2020
import { resolveApiPresetParams, paramsSerializer, mergePresetParams } from '../utils/GeoNodeUtils';
2121

2222
export const GEONODE_RESOURCE_TYPE_FILTER = 'filter{resource_type.in}';
23+
// default sort applied to the catalog resources request when the caller does not provide one
24+
// (matches the "Most recent" default shown in the catalog toolbar)
25+
export const GEONODE_DEFAULT_SORT = '-date';
2326

2427

2528
export const RESOURCES = 'resources';
@@ -211,7 +214,7 @@ export const getRecords = (url, startPosition, maxRecords, text, options) => {
211214
baseUrl: url,
212215
...(resourceTypes.length && { [GEONODE_RESOURCE_TYPE_FILTER]: resourceTypes }),
213216
...options?.options?.filters,
214-
sort: options?.options?.sort,
217+
sort: options?.options?.sort ?? service?.defaultSort ?? GEONODE_DEFAULT_SORT,
215218
...(service?.apiPresetKey && { apiPresetKey: service.apiPresetKey })
216219
});
217220
};

0 commit comments

Comments
 (0)