From e0f0a055a524bf681674a697f2319f6ca7c2d6f4 Mon Sep 17 00:00:00 2001 From: Jody Garnett Date: Wed, 28 Feb 2024 22:42:04 -0800 Subject: [PATCH] =?UTF-8?q?[GEOS-11050]=20Refactor=20Resources=20and=20Pat?= =?UTF-8?q?hs=20API=20[GEOS-11050]=20Refactor=20Resources=20and=20Paths=20?= =?UTF-8?q?API=20to=20support=20alternative=20=E2=80=A6=20#7156Refactor=20?= =?UTF-8?q?Resources=20and=20Paths=20API=20to=20support=20alternative=20[G?= =?UTF-8?q?EOS-11050]=20Refactor=20Resources=20and=20Paths=20API=20to=20su?= =?UTF-8?q?pport=20alternative=20=E2=80=A6=20#7156?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 5e3edb873c41b0065a583d14652e0c3c43aaf990 Author: Jody Garnett Date: Wed Feb 28 22:36:37 2024 -0800 [GEOS-11050] Avoid documenting deprecated methods in detail commit 8e36d6a4aa64b474f3dc92e080bb167f7fefffad Author: Jody Garnett Date: Wed Feb 28 22:36:23 2024 -0800 [GEOS-11050] Refactor Resources and Paths API to support alternative … #7156 [GEOS-11050] Complete missing javadocs commit bafc5832a26eb2b447c7cd55877a3b1efd2caf3e Author: Jody Garnett Date: Fri Feb 16 14:08:06 2024 -0800 [GEOS-11306] Java 17 does not support GetFeature lazy JDBC count(*) commit 3728861002914017a9e6c0db61960d4b04d108f9 Author: Jody Garnett Date: Fri Feb 16 14:07:06 2024 -0800 [GEOS-11307] Update apache-commons-lang3 to version 3.14.0 for Java 17 and Java 21 support commit 03cc6c6f87b6ea3d7f0b6de8bc98e29e7f62fd3a Author: davidblasby <48937730+davidblasby@users.noreply.github.com> Date: Mon Feb 26 09:35:08 2024 -0800 New Community Module - JWT Headers (#7440) * wip: jwt-headers + documentation start * wip: access token validation + test cases + documentation * pom changes from mark's review * completely remove spring dependencies * Update doc/en/user/source/community/jwt-headers/configuration.rst Co-authored-by: Andrea Aime --------- Co-authored-by: david blasby Co-authored-by: Andrea Aime commit 420e033fd46dc85b665c2251e3ffa4042e0906cd Author: Andrea Aime Date: Mon Feb 26 11:44:47 2024 +0100 Use SCSS, more tolerant to selector starting with column commit 51d02ec63500dc90dfb78d4329d6f2993f508f36 Author: Alessandro Cristofori Date: Mon Feb 19 10:09:41 2024 +0100 Adds in the CSS worksshot section of the documentation an example of how to style svg markers in the CSS styling declaration commit 108367c87d489ffff9dc18a919da7d7f02cbe386 Author: Andrea Aime Date: Wed Feb 14 15:42:43 2024 +0100 [GEOS-11305] Add layer information in the models backing STAC commit 5705d4e248959f25204911d3d11d60cd186abebe Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed Feb 21 08:03:56 2024 +0100 Bump org.postgresql:postgresql from 42.6.0 to 42.7.2 in /src (#7435) Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from 42.6.0 to 42.7.2. - [Release notes](https://github.com/pgjdbc/pgjdbc/releases) - [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md) - [Commits](https://github.com/pgjdbc/pgjdbc/commits) --- updated-dependencies: - dependency-name: org.postgresql:postgresql dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 8d924fc4ee852baffba5be1f9d97c7f48ec0c3a0 Author: Steve Ikeoka Date: Mon Feb 12 12:12:03 2024 -0800 [GEOS-11300] Centralize access to static web files commit 133d46f255cd79c5681e54115f6cd257c5cedc72 Author: NielsCharlier Date: Mon Feb 19 13:19:14 2024 +0100 GEOS-11279 allow one field multiple tabs (#7392) * GEOS-11279 allow one field multiple tabs * GEOS-11279 allow one field multiple tabs (doc) * GEOS-11279 allow one field multiple tabs (fix style) * [GEOS-11278] metadata: only selected tab is submitted, space lenience * [GEOS-11278] metadata: only selected tab is submitted, fix spelling errors commit 43c30bb900583738512ededad6da57a1ddb1be5a Author: Sebastian Frey Date: Thu Feb 15 10:29:37 2024 +0100 Support lower case sortby parameter commit c02d082fced79ed4ebd2749860f8d8ae68761673 Author: Gabriel Roldan Date: Mon Feb 19 06:21:42 2024 -0300 Fix some app schema online tests (#7424) * Fix mimetype assertion in app-schema-test's PagingTest * Include Postgis in app-schema-test's expectation respecting axis order App-schema-test's `SRCWfsTest` checked only if it run against GeoPackage to assert the expected geometries respect the EPSG axis order. Include PostGIS too and remove duplicated code. Reprojection works fine with the PostGIS online tests and produce the same expected results. commit f38775480f0861c4fb8758b213ec9be325e32907 Author: Peter Smythe Date: Mon Feb 12 21:19:35 2024 +0200 Commit-specific blob commit 6b22abd0db04d4eaad1432205fcc0643b4a12e1b Author: Peter Smythe Date: Mon Feb 12 21:18:59 2024 +0200 Commit-specific blob commit 39484358dc6475ca4dbb382333ed1c4b0c8d8476 Author: Peter Smythe Date: Mon Feb 12 17:25:47 2024 +0200 Incorporate Andrea's institutional knowledge commit a54336b0509240163aaf1a54ee6833aec7113719 Author: Peter Smythe Date: Mon Feb 12 17:22:52 2024 +0200 Incorporate Andrea's institutional knowledge commit b5641a57dc2f07a08919dd6cdbd383f4e688226a Author: Peter Smythe Date: Mon Feb 12 12:49:40 2024 +0200 Update ecql_reference.rst commit 2ca6d1dcbaed0396864d668526088464b38f731c Author: Peter Smythe Date: Mon Feb 12 12:58:34 2024 +0200 And add warning in cql_tutorial commit 21064d0081ac9d6d6ccae0f5221c631498d24285 Author: Andrea Aime Date: Mon Feb 12 17:21:06 2024 +0100 [GEOS-11260] JNDI tutorial uses outdated syntax commit d2da7cb1305450ab3c14ae9bc7b8663e9722d5e1 Author: Steve Ikeoka Date: Wed Feb 7 13:13:11 2024 -0800 [GEOS-11297] Escape WMS GetFeatureInfo HTML output by default commit c5c71205e1580419b5220ca4ccd6a38b10aafec8 Author: Jody Garnett Date: Sun Feb 11 14:33:57 2024 -0800 Update ecql_reference description of IN predicate commit 39512e2ca45cc31938de99a3715ebfcaf3030a45 Author: Andrea Aime Date: Fri Feb 9 17:54:46 2024 +0100 [GEOS-11299] Performance regression in GeoJSON output generated in EPSG:900913 commit 977e0fb69e6e159cb97dbaca49a8b7cb6152aac9 Author: Andrea Aime Date: Wed Feb 7 19:03:58 2024 +0100 [GEOS-11298] When a Raster Attribute Table is available, expose its attributes in GetFeatureInfo commit 8c0c2843437c8c08a2c49bd54b55a24ca4c49b43 Author: Peter Rushforth Date: Thu Feb 8 16:22:59 2024 -0500 Remove gzip warning, add note to MapML extension documentation commit a51f3eb2b29abaa38a6dcd234885f43acf703738 Author: Peter Smythe Date: Fri Feb 9 09:26:21 2024 +0200 [GEOS-11285] GWC REST Content-Encoding gzip returns broken response (#7370) * [GEOS-11285] GWC REST Content-Encoding gzip returns broken response * Make use of setContentLengthLong rather https://github.com/geoserver/geoserver/blob/main/src/main/src/main/java/org/geoserver/filters/AlternativesResponseStream.java#L80 * mvn spotless:apply * Add tests for both Int and Long --------- Co-authored-by: Peter Smythe commit 269038e08264d868a3f3da4fa5187ecbdcda3021 Author: Andrea Aime Date: Thu Feb 1 19:42:03 2024 +0100 [GEOS-11287] MapML throws unclear exceptions when asked to produce maps in unsupported CRSs commit 10eacf4c39217e79886b9d8d0168dfb3d24e10ac Author: Andrea Aime Date: Thu Feb 1 19:13:11 2024 +0100 [GEOS-11286] MapML HTML backlinks are not workspace aware commit 8ba8608301775642aecf0b9b87c9fa23b142d497 Author: Andrea Aime Date: Wed Jan 24 15:09:50 2024 +0100 [GEOS-11277] Have MapML CRS instances work as actual coordinate refererce systems. commit 1f478abf8127bc0cbdd6c48c2eda4d8b2dfd98b9 Author: Steve Ikeoka Date: Thu Feb 1 12:53:31 2024 -0800 [GEOS-11289] Enable Spring Security StrictHttpFirewall by default commit d770c32b06c092191fc093f8a5f76b73066891ca Author: Andrea Aime Date: Mon Feb 5 12:45:56 2024 +0100 Revert "Bump org.springframework:spring-expression" This reverts commit 63f2d81daa8c2def19f1001cd10d19b16b3848a3. commit 98fde71412cdaf7e9612b85318e805793c61b0e0 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Feb 6 21:24:19 2024 +0100 Bump org.springframework.security:spring-security-config in /src (#7403) Bumps [org.springframework.security:spring-security-config](https://github.com/spring-projects/spring-security) from 5.7.10 to 5.7.11. - [Release notes](https://github.com/spring-projects/spring-security/releases) - [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc) - [Commits](https://github.com/spring-projects/spring-security/compare/5.7.10...5.7.11) --- updated-dependencies: - dependency-name: org.springframework.security:spring-security-config dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit fde8c401e4e159c2fe1c24151dbfe5cf61714bc0 Author: Mirco Romagnoli Date: Thu Jan 25 12:11:19 2024 +0100 [GEOS-11276] Use style_body to define CSS style for a layer This commit adds a test to check that a CSS string passed as STYLE_BODY with STYLE_FORMAT=css is applied to the layer if the style name is the same of the queried layer. Documentation is also updated for the new directive. commit 2b8989de8c1550f7c383629c257721050bcaa8df Author: Peter Smythe Date: Tue Feb 6 10:32:14 2024 +0200 Update psc.rst commit acea59a1b0a689e6e7ee8e6f6d10aac4bdaa01ee Author: Joe <31628530+turingtestfail@users.noreply.github.com> Date: Tue Feb 6 03:49:33 2024 -0500 [GEOS-11232] Add Zoom scaled layer templates to MapML (#7397) switched to binary search working test for zoom input unit tests and fix for single extent detection GetMap tests wms output format documentation added some edge tests unused var ground resolution to scale updated tests and fixed infinite check Reproject bounds - For gwc-backed GetMap request update extentZoomInput.value with the gss.getZoomStop() to match the zoom value used by the location inputs' min/max row and column axes. Non-GWC backed GetMap zoom input will not carry a value attribute, and it's not necessary - tbd: a test to cover it commit 95696e94b431223e0768e3e0ed5aa6c617bce0b7 Author: Julien Sabatier Date: Mon Feb 5 17:27:47 2024 +0100 Use threads to read altitude in wps-longitudinal-profile community module (#7363) * Use threads to read altitude in wps-longitudinal-profile community module * Adding GeoServer copyright header to AltitudeReaderThread * Adding GeoServer copyright header to ProfileVertice * Replace Vector with ArrayList * Move thread pool to class level * Replace Stack with ArrayList * Retrieve adjustment geoms only once at start * Process altitude adjustment by adjustable chunks of vertices * QA fixes commit 48943b61a48e8b5993d735738eec1e3dbb243346 Author: Andrea Aime Date: Mon Feb 5 16:02:21 2024 +0100 Updating documentation for vector mosaic commit bdcec7db801f34f8a81119521bd6c4703300059b Author: etj Date: Mon Feb 5 13:27:20 2024 +0100 [GEOS-11291] GeoFence: Cleanup stale log4j references commit 06fa1c29f206aa70fb810383581d28e7609d0a81 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Feb 2 20:28:09 2024 +0000 Bump org.springframework:spring-expression Bumps [org.springframework:spring-expression](https://github.com/spring-projects/spring-framework) from 3.2.5.RELEASE to 5.2.23.RELEASE. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v3.2.5.RELEASE...v5.2.23.RELEASE) --- updated-dependencies: - dependency-name: org.springframework:spring-expression dependency-type: direct:production ... Signed-off-by: dependabot[bot] commit 011e6db3dfe6dd99ca3cd94cd1f1e5fe939bc05a Author: Steve Ikeoka Date: Thu Feb 1 12:11:09 2024 -0800 [GEOS-11288] Improve input validation in ClasspathPublisher commit 6c0b2471bacd4428ae63163dd6e8d1b33de8ae92 Author: NielsCharlier Date: Fri Jan 26 10:51:43 2024 +0100 GEOS-11278 metadata: only selected tab is submitted commit 70555d3fff0d1109b3a1bcaf1066deca64814552 Author: iaunzu <32395827+iaunzu@users.noreply.github.com> Date: Mon Feb 5 11:20:56 2024 +0100 [GEOS-11263] hideEmptyRules not working in JSON LegendGraphic (#7353) * [GEOS-11263] Fix hideEmptyRules in JSON Legends * Compute hideEmptyRules with BBOX only and skip rasterSymbolizers * Better test commit e3a18b8c51b9b27f2891cc9eda55e5496dcb9755 Author: NielsCharlier Date: Mon Nov 20 13:52:14 2023 +0100 [GEOS-11205] Layer page: style image fails if it is in isolated workspace commit 68697945035934f8c88ad1e637e9cb3172bbc437 Author: etj Date: Fri Feb 2 15:14:05 2024 +0100 [GEOS-11290] With Oauth enabled, anon users get random auth requests commit ec5511dd3b30287eb3d74f60ddf7006fec3c4770 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Feb 3 12:57:50 2024 +0100 Bump com.jayway.jsonpath:json-path from 2.7.0 to 2.9.0 in /src (#7358) * Bump com.jayway.jsonpath:json-path from 2.7.0 to 2.9.0 in /src Bumps [com.jayway.jsonpath:json-path](https://github.com/jayway/JsonPath) from 2.7.0 to 2.9.0. - [Release notes](https://github.com/jayway/JsonPath/releases) - [Changelog](https://github.com/json-path/JsonPath/blob/master/changelog.md) - [Commits](https://github.com/jayway/JsonPath/compare/json-path-2.7.0...json-path-2.9.0) --- updated-dependencies: - dependency-name: com.jayway.jsonpath:json-path dependency-type: direct:development ... Signed-off-by: dependabot[bot] * Add scoped override for json-smart to override the runtime scope of the json-path provided version --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mark <1165786+mprins@users.noreply.github.com> commit cce5f19b270e51401f082c8f049d3d0e7dc300c3 Author: Alessio Fabiani Date: Wed Jan 31 10:39:41 2024 +0100 [GEOS-11225] AuthKey synchronize the user/group automatically (#7316) * [GEOS-11225] AuthKey synchronize the user/group automatically * - Purge web-service cache on synchronize - Code refactoring for readability and stability * - missing mapper setting * - trying to fix qa checks * Fix QA checks * - Updating the plugin user documentation * - docs typo commit 1cd31d186c8bdfb8f3e2b821b957150da87ce1af Author: Peter Smythe Date: Wed Jan 31 10:55:01 2024 +0200 Fix spelling mistakes only commit e30ca393e21738a9083173e2e6d0bd9fffdd490b Author: Andrea Aime Date: Wed Jan 24 17:07:17 2024 +0100 Update FUNDING.yml commit e55624676ebf6da946cfddccf40ea5d0728477b6 Author: NielsCharlier Date: Wed Jan 24 11:02:24 2024 +0100 [GEOS-11163] Taskmanager: support for metadata attributes sync (#7355) * [GEOS-11163] Taskmanager: support for metadata attributes sync * Taskmanager: minor fixes * [GEOS-11163] Taskmanager: support for metadata attributes sync (fix) commit a972e9f746a0f4b9f5e9c178b0bfe2e9b2c54ca2 Author: Joseph Miller Date: Sun Nov 19 12:43:37 2023 -0500 [GEOS-11207] Refactor MapML MVC controller as GetMap-based operation with standard parameter format working on builder initialize first pass more initialize finished first pass at head builder first pass done first pass at marshalling mapml map response stuff changed the proj stuff first pass at formatlink Got main test working most tests done more tests included all original tests passing html html test passing added height and width int not double subtype not format cleanup copyright missing more test cleanup added default image type to HTML fixed empty style issue exceptions were being prematurely caught PR responses test cleanup added WMS parameter and fixed header base and header styles WMS parameter and requested changes, XML validated fixed issues with XML namespaces and some misc fixes for new extent handling switched from WMS to serviceinfo metadata clean up added multilayer tests Front end multi-extent setting front end test doc updates doc tweak alt link height and width and remove hidden from multi-extent query_layers for single extent added bbox to alt and switch center lat and lon of html to use wgs84 style and self style title, bbox, width, height added empty commas for default styles self style default fixed regular styles issue Add label to multi-extent map-extent when global MapML setting enabled Fix NPE with multi-layer, single extent requests across, layers, groups fix issue with trailing blank style Added test for trailing comment in styles list Make GetMap with format=text/html; subtype=mapml respect bbox param Add and Date: Tue Jan 23 14:52:11 2024 +0100 [GEOS-11250] WFS GeoJSON encoder fails with an exception if an infinity number is used in the geometry (#7343) * [GEOS-11250] WFS GeoJSON encoder fails with an exception if an infinity number is used in the geometry This commit avoids a JSONException in case of a coordinate with infinite value (positive or negative). A coordinate with an infinite value will be encoded as a string "Infinity" or "-Infinity", depending on the coordinate sign. * [GEOS-11250] Fix method name Fix the incorrect method name and add some comments to explain the new method behavior * [GEOS-11250] fix formatting on encodeOrdinate method commit 5abd45ff19a3892c14c8ebf68ae666151deb727d Author: Andrea Aime Date: Wed Dec 27 09:18:20 2023 +0100 [GEOS-11248] Move version header handling from APIBodyMethodProcessor to APIDispatcher commit b4ebb37257a612a3da627e0ef7e644ed67ade6d7 Author: Andrea Aime Date: Tue Dec 26 15:59:30 2023 +0100 [GEOS-11247] Avoid HTML annotations special status in APIBodyProcessor commit 094fe37d28e6f41b03c28ce1e2e3b774f592cf92 Author: iaunzu Date: Tue Dec 26 12:16:52 2023 +0100 Add support for multiple inserts with different idGen commit e52b2a43a071d6c177f6f0521c9dfcc12afc8187 Author: Andreas Schmitz Date: Wed Dec 13 11:36:52 2023 +0100 [GEOS-10933] Fix keycloak plugin logout commit 25860a2de4b0e95d2eba0985793c10c16c6808c4 Author: Peter Smythe Date: Tue Jan 16 13:13:43 2024 +0200 Incorporate Andrea's feedback commit 9847a03699b382a4cbe0753955971e41457a16d8 Author: Peter Smythe Date: Wed Jan 10 18:10:56 2024 +0200 Fix Wicket reference link commit f131a6760ecde31c36b34a65514652c85af259b2 Author: Andrea Aime Date: Wed Jan 10 11:19:20 2024 +0100 [GEOS-11216] Ensure the labels at the corners stay inside the graticule frame commit 2b70c1802edd5e46693c233bf51c669b4366341e Author: Andrea Aime Date: Tue Jan 9 13:05:26 2024 +0100 [GEOS-11216] Handle reprojected bbox case and allow for no bounds clipping too (for tiled maps) commit f7d5de3008341eefa0555e0f93ea51a634a952ab Author: Andrea Aime Date: Tue Jan 9 11:12:03 2024 +0100 [GEOS-11216] Graticule store panel resets bbox to emtpy one when editing existing store commit 78dde2a9683ed291ebaf38bd3f978fe7101316b7 Author: Gabriel Roldan Date: Fri Dec 22 20:45:27 2023 -0300 [GEOS-11241] ModificationProxy breaks information hidding on CatalogInfo.accept(CatalogVisitor) `ModificationProxy` breaks information hidding on `CatalogInfo.accept(CatalogVisitor)`, exposing the proxied object. Follow up on commit 01bd2f2deb6fee761ca96b7035f6178996c6a16e (from GEOS-10356) which fixed it only for `FeatureTypeInfo`, by calling the appropriate `CatalogVisitor.visit(...)` overload method with the `ModificationProxy` proxy object and not with its internal `CatalogInfo`. commit c762b513ab29dfa6598659502018ba27869050c9 Author: Steve Ikeoka Date: Wed Nov 22 13:45:07 2023 -0800 [GEOS-11213] Improve REST external upload method unzipping commit afba12f25f56f373510901b8e579e8c4e1d76449 Author: Steve Ikeoka Date: Tue Jan 9 08:14:38 2024 -0800 [GEOS-11242] Remove the Xalan library (#7331) commit 1933f2ee9fbc1f3a11ccc72dc35d36ff6fbd6c77 Author: mike Date: Wed Dec 20 18:26:46 2023 +0400 [GEOS-11246] Schemaless plugin performance for WFS commit 06665c33468a1ff53c8fe697318cacdc0649c212 Author: Peter Smythe Date: Tue Jan 9 09:27:23 2024 +0200 Number test filter uniquely commit c90c91134cdbdbbc6eb0f36510f41955f0f9e4ed Author: Peter Smythe Date: Mon Jan 8 17:37:20 2024 +0200 Add unit test required commit 0c65d7071cbfa65406362ec6392e84540d90ea2c Author: Peter Smythe Date: Sun Jan 7 11:33:32 2024 +0200 Missed community oauth2 test commit b512ab6bb04a6a51c7e022aafb69cd5cc860b286 Author: Peter Smythe Date: Sat Jan 6 21:21:55 2024 +0200 [GEOS-11051] Env parametrization does not save correctly in AuthKey extension commit d9cbb79e62578f564788632b42e08f6ae82f1ad7 Author: Peter Smythe Date: Mon Jan 8 17:19:14 2024 +0200 Fix GetCapabilities format parameter based on review feedback commit e7f8560605bad620fa6f455146866035074d264e Author: Peter Smythe Date: Mon Nov 27 12:25:45 2023 +0200 Clarify GetCapabilities format options From GetCapabilitiesTransformer.java commit 6c03c8d643be6c62c28c5643d967e77cf6b3b8c5 Author: Peter Smythe Date: Fri Jan 5 18:39:41 2024 +0200 Update urlchecks.rst commit 404bc2a72c721dd13e510f8a9d7106fccbeac297 Author: Peter Smythe Date: Fri Jan 5 16:34:14 2024 +0200 Update urlchecks.rst Clarify that this does not apply to admin-configured URLs (e.g. WFS, cascaded WMS & WMTS) commit 1fc1bd716eec439f334efce84ddfd82833c64852 Author: Peter Smythe Date: Fri Jan 5 10:11:10 2024 +0200 Update urlchecks.rst Fix spelling commit dcaa6c1a103be58f2c41415cf70911313006708e Author: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Thu Jan 4 11:36:26 2024 +0100 [GEOS-11245] Update OSHI from 6.2.2 to 6.4.10 (#7333) commit e72f9aed1c087679031ff802f13ce023172d59fa Author: Andrea Aime Date: Sat Dec 16 17:57:34 2023 +0100 Adding Java 21 (just like Java 17, which is still labelled experimental commit fb8dd5b9160b12d930a710264117997d3a4726c4 Author: Andrea Aime Date: Sat Dec 16 17:57:18 2023 +0100 Update MapML tests, a URL with a curly brace in the host would not parse in Java 21 commit 6e5e1e3a0c35ce825065d8141d9b04ef434e4f1f Author: Andrea Aime Date: Sat Dec 16 17:10:34 2023 +0100 Setting reserved code cache to 420m commit 000f4c0f608fe3c226bc4407bac3c3b8869d77f8 Author: Gabriel Roldan Date: Sat Oct 21 22:37:37 2023 -0300 Fix GeoServerNodeDataTest to work with Java 21 Eesymock can't extend InetAddress because it's a sealed class commit 7ede4234fd69470b1efa0aa74753f6a3ce6d8e7e Author: Gabriel Roldan Date: Sat Oct 21 22:36:40 2023 -0300 Upgrade easymock:4.3->5.2.0, cglib-nodep:2.2->3.3.0 commit 0655685db23f00b02a1815f0ecf508edf6092b7a Author: Gabriel Roldan Date: Sat Oct 21 20:01:30 2023 -0300 Upgrade mockito:3.12.4 -> 5.6.0 Removes gs-main dependency on mockito-inline, since version 5.0 mockito-inline is the default mockmaker. See https://github.com/mockito/mockito/releases/tag/v5.0.0 commit e9aeead2e7f54bee5c3ba95bb86b7b8fe14b14d4 Author: Pierre Mauduit Date: Thu Dec 14 21:10:52 2023 +0100 [GEOS-11235] preauthentication filters - session reuse even after having logout .. or if no preauth headers are provided anymore. See https://osgeo-org.atlassian.net/browse/GEOS-11235 for more details. Without this change, we can end up with a persisting session across logout. Tests: adding utests specific to this change. Runtime tested into a docker composition. commit ab43dac002c5ac7814d9f41ac85aa894f3d772c0 Author: Andrea Aime Date: Wed Dec 27 08:42:59 2023 +0100 [GEOS-11216] Graticule datastore improvements (#7328) * [GEOS-11216] Graticule datastore code simplifications and QA * [GEOS-11216] Allow to fetch levels by equality, using >= won't work if the steps are not multiple of each other * [GEOS-11216] Simplify labelling, and show examples of how to create a compact style commit da2f19faa9b143e2665e38c9819c2387c3dbce5c Author: Brad Hards Date: Sun Dec 24 19:15:11 2023 +1100 correct spelling in Windows installer documentation commit a31f578c9f4ee05f47342cc64e3311b3189f92b1 Author: Peter Smythe Date: Sun Dec 24 09:59:40 2023 +0200 Capitalise properly commit 8b8528711d363f0eb68ee69d74bdd2ee17702ba0 Author: Jody Garnett Date: Sat Dec 23 23:33:40 2023 -0800 Update intro to windows installer instructions commit 23254695f12136daf767747cfa14df743ce0e249 Author: Ian Turton Date: Thu Dec 21 14:54:48 2023 +0000 [GEOS-11216] Create a datastore to produce graticules for WMS maps (#7297) * initial wip * day2 - wip * first working version * wip * working grids in WMS * some QA fixes * starting to work, still won't reload layers * more fixes, still won't work on restart * fixed label placements * topleft style working, still won't restart * seems to work * QA fix format * mostly working Graticule module * more QA fix * combine spacings into one layer, selectable by level * qa cleanup * opening docs * fix docs issue * general clean up and testing * fix restart issue with ReferencedEnvelope Parameters * remove unneeded style handler * move to ContentDataStore * add single edge positions * QA fixes --------- Co-authored-by: Ian Turton commit 506c0b69d8b8038aa64230d31d9e2ee8c686f0c9 Author: NielsCharlier Date: Mon Dec 18 12:28:23 2023 +0100 Metadata extension: remove stacktrace and before work-around (#7310) * Metadata extensions: remove stacktrace and before work-around * Metadata extension: get rid of severe logging commit 72e11a614f07ed3e34adedc538a7baff11954f30 Author: Sebastian Frey Date: Wed Dec 6 13:39:31 2023 +0100 [GEOS-11222] Add Search conformance class commit 76c81fa51b88bf99002f04a256cb42e53ccffcd1 Author: Gabriel Roldan Date: Sun Dec 10 22:18:02 2023 -0300 Add missing extension names to ModuleStatusImpl spring beans Some beans of type `org.geoserver.platform.ModuleStatusImpl` defined in `applicationContext.xml` spring beans definition files aren't named. Add `"id"=""` in such cases. commit 4d8a20d7880ab9771e11216ff2d25b750d0d54cd Author: Steve Ikeoka Date: Fri Dec 1 10:19:50 2023 -0800 [GEOS-11220] Upgrade Hazelcast from 5.3.1 to 5.3.6 commit edbe00cb4844ee73b4c29d0385f73eec64e0ea33 Author: Gabriel Roldan Date: Sun Dec 10 22:46:09 2023 -0300 Remove gs-web-core dependency from community/flatgeobuf (#7320) commit 4794ed8a975d300c0401b70248d4693c5fb3236f Author: Jody Garnett Date: Thu Dec 7 08:25:15 2023 -0800 [GEOS-11224] startup.sh determine GEOSERVER_DATA_DIR absolute path commit a3103b35ecc61aceb7ed3bed8916e1ac024c075f Author: Andrea Aime Date: Mon Dec 4 18:23:15 2023 +0100 [GEOS-11226] Enable JTS OverlayNG by default commit c6b8ab19c6f347f24916148ac1dfa8166cfbc25e Author: Andrea Aime Date: Thu Nov 30 11:35:36 2023 +0100 [GEOS-11223] Layer not visible in preview/capabilities if security closes the workspace, but allows access to the layer commit e1a23ed60c4a4c11f3e2c00cec8eec9cfcf86d00 Author: awaterme Date: Thu Nov 30 20:12:05 2023 +0100 [GEOS-11219] Upgrade mail and activation libs (#7302) commit 3aafa12c6a452d205be3e696b04faba7ad1f6839 Author: Andrea Aime Date: Thu Nov 30 10:31:56 2023 +0100 Updates following up GeoTools update to pass down max features to WFS 2.0 servers commit b18901f76acc1d7dedc93c58b1f60f0e3b0ce5de Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Wed Nov 29 16:53:15 2023 -0500 Translated using Weblate (Portuguese (Brazil)) (#7300) Currently translated at 66.1% (679 of 1027 strings) Translation: GeoServer/web-core Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-core/pt_BR/ Co-authored-by: Matheus Gomes commit 0abc38c350b7e1d016a8019002dd8df231ec6aee Author: NielsCharlier Date: Mon Nov 27 13:53:19 2023 +0100 [GEOS-11082] Taskmanager: keycloak support (#7288) * [GEOS-11082] Taskmanager: keycloak support * [GEOS-11082] Taskmanager: keycloak support (proxy host) * [GEOS-11082] Taskmanager: fix dep commit cc1eca3f5435457ce6d8e0f5e4055df943bd3ffa Author: Andrea Aime Date: Tue Nov 21 15:35:01 2023 +0100 [GEOS-9757] Return a service exception when client provided WMS dimensions are not a match commit b83a952bb3beb4513df248f2635695042753b8dd Author: Peter Smythe Date: Sat Nov 25 19:31:36 2023 +0200 Update documentation commit 9d67b1275258a34b7c2ea11bc4a2fec15bbea61a Author: Peter Smythe Date: Sat Nov 25 19:26:52 2023 +0200 Update documentation Spelling and grammar commit 6d3f5faef08a4c88c7eaf2744c198970385b5c1f Author: Jody Garnett Date: Wed Nov 22 21:29:09 2023 -0800 [GEOS-11212] Check signature validation using JWKS publicKey and access token expiration commit f39ddde7bc7ab1594cfd0ca43f259530db36c3e6 Author: Jody Garnett Date: Wed Nov 22 21:27:43 2023 -0800 [GEOS-11209] Proof Key of Code Exchange (PKCE) * Add PKCE configuration option for open id connect module * Include OIDC_LOGGING profile to aid in troubleshooting * PKCEAuthenticationEntryPoint to generate and store code_verifier, and then include code_challenge in authorization request * PKCERequestEnhancer to retrieve code_verifier and include in access token request * PKCE dependency management and include in openid-connect assembly * Add PKCE information to docs Introduce some protected methods introduced into oauth2-core classes to allow override for PKCE workflow. commit 397a6b02f52e5494b742daa31e813361f07eb607 Author: Peter Smythe Date: Tue Nov 21 11:31:59 2023 +0200 [GEOS-11203] WMS GetFeatureInfo bad WKT exception for label-geometry (#7275) * [GEOS-11203] WMS GetFeatureInfo bad WKT exception for label-geometry * Broaden the exception * Just fix unrelated spelling mistake * Added integration test --------- Co-authored-by: Peter Smythe commit 527b843fe15119f7deeadea004d8b58b9a3484ba Author: Andrea Aime Date: Fri Nov 17 18:01:33 2023 +0100 [GEOS-11206] Throw nearest match mismatch exceptions only for WMS commit 6cd2c0e4870dcd56f2b175a8174f1b95feac359e Author: Joseph Miller Date: Thu Nov 9 13:03:14 2023 -0500 [GEOS-11192] Make refresh button for Elasticsearch fields configuration got ajax refresh working added check if refresh test finally working docs cleanup more cleanup PR cleanup parent panel refresh cleaner search for attribute panel it test fix commit 5edaecf4a1075aa4c841b1fa4197818fccb74002 Author: Simon Hofer Date: Thu Sep 28 07:44:12 2023 +0200 [GEOS-11150] add geoserver-monitor-kafka extension commit ab04dcfe52e74d8b6e46e7b243783cb1a3a9b695 Author: Steve Ikeoka Date: Tue Oct 10 08:35:52 2023 -0700 [GEOS-11154] Improve handling special characters in the MapML HTML Page commit 7902a53a6c736b202ab1f6ccb30141f51c2c5614 Author: Steve Ikeoka Date: Tue Oct 10 08:12:30 2023 -0700 [GEOS-11152] Improve handling special characters in the Simple SVG Renderer commit 38f2b9422f2562ff122131c86f41a110e9b7e0c0 Author: etj Date: Wed Nov 15 11:15:59 2023 +0100 [GEOS-11196] NPE in VectorDownload if ROI not defined commit 4ccb94b41853283ac62a4f3d1b6913f2778cd4e4 Author: Andrea Aime Date: Wed Nov 15 17:54:21 2023 +0100 [GEOS-11200] GetFeatureInfo can fail on rendering transformations that generate a different raster commit 3042c5d161e581a26f494f31c26955683ab98239 Author: Brad Hards Date: Tue Oct 24 13:42:54 2023 +1100 [GEOS-11170] OGC API Features "/api" link is broken in OpenAPI page commit eec93d4616c2fdbd80cdb9328f833f230cdb440b Author: Andrea Aime Date: Wed Nov 8 15:17:32 2023 +0100 [GEOS-11188] Let DownloadProcess handle download requests whose pixel size is larger than integer limits commit 76c1d72226c674093a70ca1111802d8850241a66 Author: etj Date: Thu Nov 9 16:57:37 2023 +0100 [GEOS-11190] GeoFence: align log4j2 deps commit 73e326d729496a1bcbd62ca830e58f6613f8c63a Author: Andrea Aime Date: Fri Nov 10 17:55:52 2023 +0100 [GEOS-11193] Add an option to throw an exception when the time nearest match does not fall within search limits commit d1d8c3446176140127705b77a9fc54b25d9ee3a3 Author: Andrea Aime Date: Wed Nov 8 14:50:13 2023 +0100 [GEOS-11187] Configuring a raster with NaN as NODATA results in two NaN in the nodata band description commit d3d704173312ae338913beaa310efd9dc14d22a4 Author: Peter Rushforth Date: Thu Oct 12 11:51:19 2023 -0400 [GEOS-11185] Update MapML viewer to latest release 0.12.1 - map-extent attributes commit f2e4b782c6d1ffce89d62621939d60cfa58cc191 Author: Brad Hards Date: Tue Nov 7 20:13:02 2023 +1100 [GEOS-11186] Fix maven enforcer failFast (#7246) commit ab114df9672015f0f424fb679a735c4767808d0c Author: Andrea Aime Date: Tue Nov 7 07:12:45 2023 +0100 [GEOS-11184] ncwms module has a compile dependency on gs-web-core test jar (#7244) commit 09e922a3310af3a2cdde0078549a819bb4c4b0aa Author: Andrea Aime Date: Sun Nov 5 17:19:56 2023 +0100 Forgot to add RAT controller API commit a7ed1058ad5b2cccb931bd87e4ccad080c187055 Author: Peter Smythe Date: Fri Nov 3 11:08:56 2023 +0200 Fix URLcheck heading, grammar (#7241) Co-authored-by: Peter Smythe commit 369b6c95eb90e75610d24488eba225d96ec2f318 Author: Andrea Aime Date: Thu Nov 2 12:12:56 2023 +0100 [GEOS-11175] Raster Attribute Table community module commit 10ffac35465fe51e85a997dccba7b92e40c984e5 Author: Andrea Aime Date: Thu Nov 2 12:12:32 2023 +0100 [GEOS-11182] Avoid legends with duplicated entries commit 35dd1f47283937369ef65444bcd1f4083445bda7 Author: Andrea Aime Date: Thu Nov 2 12:11:58 2023 +0100 [GEOS-11181] Update jai-ext to 1.1.25, [GEOS-11180], Update ImageIO-Ext to 1.4.9 commit 6dbc840ebadf9266a3bc38a91653e334537f17e7 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Thu Nov 2 04:56:40 2023 -0400 Translations update from OSGeo Weblate (#7239) * Added translation using Weblate (French) * Translated using Weblate (French) Currently translated at 37.5% (56 of 149 strings) Translation: GeoServer/community-task-manager Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-task-manager/fr/ --------- Co-authored-by: Alexandre Gacon commit 95ee5fb5a1153631c0afb5e77a4070e8ece04986 Author: Jody Garnett Date: Wed Nov 1 09:44:21 2023 -0700 [GEOS-11160] GitHub workflow updates for consistency (#7189) * Seperate workflow for assembly testing * Unbundling assembly:single testing from linux_jdk11.yml * QA and formatting * github workflow action consistency * linux matric build for jdk 11 and 17 with experimental build of 21 * Comment out JDK 21 experimental build as tests are not in a postion to pass yet * Factor out -Dspotless.apply.skip=true to MAVEN_OPTS * Double check order of mvn commands * Increase builds to -Xmx1024m as I am tired of restarting maven-war-plugin heap space failures commit af27beee0b6b730384410bdb8c088b20f4ea42b5 Author: Peter Smythe Date: Tue Oct 31 15:34:42 2023 +0200 Update index.rst (#7237) * Update index.rst Release notes * Update index.rst * Update index.rst commit 12ac8704fa226d84f22775f6a476af3464b8c47a Author: Peter Smythe Date: Tue Oct 31 15:33:23 2023 +0200 Update index.rst (#7238) commit f85179d681c6dfeb9f96afd7ca8ec820428d4a3b Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Oct 31 05:05:48 2023 +0100 Bump org.apache.activemq:activemq-client (#7235) Bumps org.apache.activemq:activemq-client from 5.15.11 to 5.15.16. --- updated-dependencies: - dependency-name: org.apache.activemq:activemq-client dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7809d22fa75449560c9256e5c87c176bfad9c3ca Author: Steve Ikeoka Date: Thu Oct 26 10:32:16 2023 -0700 [GEOS-11176] Add validation to file wrapper resource paths commit bc0e802cb9bd136e68adc660eff3dc7fbf5b3aef Author: Steve Ikeoka Date: Wed Oct 11 13:54:46 2023 -0700 [GEOS-11155] Add the X-Content-Type-Options header commit 148b24793f9ec91fcff555db33aa7a317fce79ea Author: NielsCharlier Date: Mon Oct 30 11:02:28 2023 +0100 [GEOS-11096] csw: support multiple mappings (#7072) * [GEOS-11096] csw: support multiple mappings * [GEOS-11096] csw: support multiple mappings - fix unit tests for apple & mac * [GEOS-11096] csw: support multiple mappings: documentation * [GEOS-11096] csw: support multiple mappings: documentation fi commit 029d3a5ed7a514b7d9188930bda23a304c5be62b Author: NielsCharlier Date: Mon Oct 30 11:00:30 2023 +0100 [GEOS-11101] metadata: multiple tabs (#7073) * [GEOS-11101] metadata: multiple tabs * [GEOS-11101] metadata: multiple tabs - fix pmd violation * [GEOS-11101] metadata: multiple tabs - fix tests * [GEOS-11101] metadata: multiple tabs - documentation * [GEOS-11101] metadata: multiple tabs - fix formatting + add image commit d30a82df57e0524c572d0d2e423cf0ef040eaafc Author: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Fri Oct 27 10:58:02 2023 +0200 Update CITE docker Tomcat version to use 9-jdk11 as base image (#7217) This updates the docker base image to use a fluid `tomcat:9-jdk11` which should be up2date when the image is built. commit 0b90c715e280497c71b35f9b6d585a1b9dca80fc Author: Steve Ikeoka Date: Tue Oct 24 08:43:57 2023 -0700 [GEOS-11173] Default to using HttpOnly session cookies commit 786379a567083295fb5ce068be2bc2e93c6088e7 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Tue Oct 24 03:25:16 2023 -0400 Translations update from OSGeo Weblate (#7210) * Added translation using Weblate (French) * Added translation using Weblate (French) * Added translation using Weblate (French) * Translated using Weblate (French) Currently translated at 100.0% (10 of 10 strings) Translation: GeoServer/community-dds Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-dds/fr/ * Translated using Weblate (French) Currently translated at 100.0% (22 of 22 strings) Translation: GeoServer/community-gwc-azure-blob Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-gwc-azure-blob/fr/ * Translated using Weblate (French) Currently translated at 100.0% (11 of 11 strings) Translation: GeoServer/community-cog Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-cog/fr/ * Translated using Weblate (French) Currently translated at 100.0% (10 of 10 strings) Translation: GeoServer/community-gwc-sqlite Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-gwc-sqlite/fr/ --------- Co-authored-by: Alexandre Gacon commit a2074e2924ae13d68cb521e4ff44fdf7cce65e70 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Oct 24 06:24:18 2023 +0200 Bump com.rabbitmq:amqp-client in /src/community/notification (#7213) Bumps [com.rabbitmq:amqp-client](https://github.com/rabbitmq/rabbitmq-java-client) from 5.9.0 to 5.18.0. - [Release notes](https://github.com/rabbitmq/rabbitmq-java-client/releases) - [Commits](https://github.com/rabbitmq/rabbitmq-java-client/compare/v5.9.0...v5.18.0) --- updated-dependencies: - dependency-name: com.rabbitmq:amqp-client dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit a6696268fa092ec4e11db5df74e5539a9f4c4955 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Oct 24 06:23:25 2023 +0200 Bump com.rabbitmq:amqp-client in /src/community/notification-common (#7212) Bumps [com.rabbitmq:amqp-client](https://github.com/rabbitmq/rabbitmq-java-client) from 5.9.0 to 5.18.0. - [Release notes](https://github.com/rabbitmq/rabbitmq-java-client/releases) - [Commits](https://github.com/rabbitmq/rabbitmq-java-client/compare/v5.9.0...v5.18.0) --- updated-dependencies: - dependency-name: com.rabbitmq:amqp-client dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit a635f02f98a38ff82a9ea19f72a0ac7de352b7da Author: AlexGacon Date: Mon Oct 23 07:33:22 2023 +0200 Update translation doc (transifex -> weblate) (#7209) commit 2f6c03569f6d762bcd01794bbd1798fb82b4c9c8 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Mon Oct 23 01:29:08 2023 -0400 Translations update from OSGeo Weblate (#7208) * Added translation using Weblate (French) * Translated using Weblate (French) Currently translated at 100.0% (48 of 48 strings) Translation: GeoServer/community-backup-restore Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-backup-restore/fr/ --------- Co-authored-by: Alexandre Gacon commit bce11c09f7831c1ccd0da21afd52415c19e93cbd Author: Gabriel Roldan Date: Sat Oct 21 20:32:40 2023 -0300 Fix build for community module rest-openapi commit 1d3494d027dcb1a767107475d43ad4b8e617a353 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Fri Oct 20 21:57:14 2023 -0400 Translations update from OSGeo Weblate (#7203) * Added translation using Weblate (French) * Added translation using Weblate (French) * Translated using Weblate (French) Currently translated at 99.0% (1014 of 1024 strings) Translation: GeoServer/web-core Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-core/fr/ * Translated using Weblate (French) Currently translated at 100.0% (33 of 33 strings) Translation: GeoServer/extension-web-resource Translate-URL: https://weblate.osgeo.org/projects/geoserver/extension-web-resource/fr/ * Translated using Weblate (French) Currently translated at 100.0% (5 of 5 strings) Translation: GeoServer/web-rest Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-rest/fr/ * Translated using Weblate (French) Currently translated at 100.0% (10 of 10 strings) Translation: GeoServer/extension-wps-download Translate-URL: https://weblate.osgeo.org/projects/geoserver/extension-wps-download/fr/ --------- Co-authored-by: Alexandre Gacon commit f6b69bcd4c5d325e7af089f3ea0a40be13ae94fc Author: Joseph Miller Date: Mon Oct 16 14:31:36 2023 -0400 [GEOS-11165] STAC Datacube switch eoSummaries bounds output to individual values json integration test commit 6a7e8ff44f8878d1bf6c4e106aa030733b3368f4 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Tue Oct 17 10:33:07 2023 -0400 Translations update from OSGeo Weblate (#7192) * Translated using Weblate (French) Currently translated at 100.0% (58 of 58 strings) Translation: GeoServer/web-wfs Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-wfs/fr/ * Translated using Weblate (French) Currently translated at 93.1% (489 of 525 strings) Translation: GeoServer/web-security-core Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-security-core/fr/ --------- Co-authored-by: Alexandre Gacon Co-authored-by: François Van Der Biest commit f64fe11bba4ffcb1c2b1df3fb9288be1850f3c51 Author: Andrea Aime Date: Tue Oct 17 10:05:21 2023 +0200 [GEOS-11166] OGC API Maps HTML representation fail without datetime parameter commit 6c04aac9ed41efb17a5832456ce5ff831c6682ba Author: Jody Garnett Date: Mon Oct 16 23:43:05 2023 -0700 [GEOS-11161] Address build warnings for running unit tests (#7187) * [GEOS-11161] Parameter 'source' is unknown for plugin 'maven-surefire-plugin:2.22.2:test * [GEOS-11161] JAR will be empty - no content was marked for inclusion! Many community modules do not include tests and produce a warning. To support this workflow we can allow test-jar creation to be skipped if empty. * [GEOS-11161] Allow community modules to generate empty test jars * [GEOS-11161] Remove gs-sec-oauth2-web:test:jar dependencies (as this jar is empty) commit cb61a9d567cd4457e51e0d4f3c97b78fc27f4ae1 Author: Steve Ikeoka Date: Tue Oct 10 08:28:33 2023 -0700 [GEOS-11153] Improve handling special characters in the WMS OpenLayers Format commit a6ea30672b5a0f257613f060728c040fe1cb8af4 Author: Jody Garnett Date: Sat Oct 14 19:34:55 2023 -0700 [GEOS-11134] build fix for literal include language markdown reference commit baa0889515d582ad2f878b6ff296cf605695d93b Author: Jody Garnett Date: Sat Oct 14 21:17:20 2023 -0700 [GEOS-11134] Fix community assembly filename geoserver-*.zip This prevents community-*.zip commit 642e0ad15d5c67dfcb9c6927248f0056fa01b732 Author: Jody Garnett Date: Fri Oct 13 23:13:45 2023 -0700 [GEOS-11159] adjust exclusions for mapfish print-lib dependency commit 13e6f7cc63b9a34c41445bb3eb401b49711ceb50 Author: Jody Garnett Date: Fri Oct 13 23:05:46 2023 -0700 [GEOS-11159] Update printing module docs for mapfish-print-v2 2.3.0 functionality commit 4ae86dddc846c596769bf89995a17148fb098492 Author: Jody Garnett Date: Fri Oct 13 22:53:14 2023 -0700 [GEOS-11159] Update mapfish-print-v2 2.3.0 Based on GeoTools 30.0 release commit cc2d49a5513909a9b1f2461c3a6d2fd4965a2999 Author: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> Date: Sat Oct 14 08:04:30 2023 -0400 Translated using Weblate (French) (#7184) Currently translated at 100.0% (118 of 118 strings) Translation: GeoServer/web-demo Translate-URL: https://weblate.osgeo.org/projects/geoserver/web-demo/fr/ Co-authored-by: Alexandre Gacon commit 402a1154445363d28d02b8582acbf7d68026cbdf Author: Jody Garnett Date: Thu Oct 12 19:52:38 2023 -0700 [GEOS-11134] Update war version and increase heap space to stabalize linux_jdk11.yml workflow commit fe9483a2ad66bb5874e81187b37933a0bdf188c0 Author: Jody Garnett Date: Thu Oct 12 18:15:17 2023 -0700 Fix case senstive LICENSE reference commit b8d90e686020b4bfb0930d5927b3da91ea5e147a Author: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Thu Oct 12 12:58:39 2023 +0200 Update src/release/extensions/dxf/dxf-LICENSE.md commit a7eea35293f6dff176ec43d67356b62c7e0e51af Author: Jody Garnett Date: Wed Oct 11 02:00:14 2023 -0700 [GEOS-11134] Include GPL in war and bin assemblies, check links commit 8f059fbdabf76a94b7fa86be187a455e26ee09ad Author: Jody Garnett Date: Wed Oct 11 01:49:18 2023 -0700 [GEOS-11134] Update notice links to https, fix link for JTS commit b81a59f92df13f6b0633b2bbf4693e724de6ca03 Author: Jody Garnett Date: Wed Oct 11 01:05:15 2023 -0700 [GEOS-11134] breakout LICENSE_GT and LICENSE_GS generic notices To be used for all the plugins that do not have have their own license notice. commit c523cb5fc97bfe327f2f9ce556d96d14d371db77 Author: Jody Garnett Date: Tue Oct 10 23:07:27 2023 -0700 [GEOS-11134] Review generation of html files to double check NOTICE and GPL included in licenses folder commit 91a26b8243b1b805b11818078d6d71c68207e8e1 Author: AlexGacon Date: Wed Oct 11 08:29:03 2023 +0200 Weblate integration : remove blocking translations and test adding new translations (#7179) * Translated using Weblate (French) Currently translated at 100.0% (35 of 35 strings) Translation: GeoServer/extension-mapml Translate-URL: https://weblate.osgeo.org/projects/geoserver/extension-mapml/fr/ * Remove UTF8 only file to enable weblate integration * Delete src/web/gwc/src/main/resources/GeoServerApplication_zh_CN.utf8.properties Remove file not compatible with weblate * Delete src/web/security/core/src/main/resources/GeoServerApplication_zh_CN.utf8.properties Remove file not compatible with weblate * Delete src/web/wms/src/main/resources/GeoServerApplication_zh_CN.utf8.properties Remove file not compatible with weblate * Delete src/web/demo/src/main/resources/GeoServerApplication_zh_CN.utf8.properties Remove file not compatible with weblate * Translations update from OSGeo Weblate (#2) * Added translation using Weblate (French) * Translated using Weblate (French) Currently translated at 100.0% (20 of 20 strings) Translation: GeoServer/community-elasticsearch Translate-URL: https://weblate.osgeo.org/projects/geoserver/community-elasticsearch/fr/ --------- Co-authored-by: Alexandre Gacon --------- Co-authored-by: OSGeo Weblate <97247866+osgeoweblate@users.noreply.github.com> commit c6b76c1038ba513b656566e9555091e37c128bf2 Author: Steve Ikeoka Date: Wed Oct 4 09:37:34 2023 -0700 [GEOS-11142] Add mime type mapping for yaml files commit 35069b8b54fcc689063bca285552993ee34a470c Author: Jody Garnett Date: Tue Oct 10 09:55:18 2023 -0700 [GEOS-11137] Update SECURITY.md with coordinated disclosure policy (#7138) * Update SECURITY.md with coordinate disclosure policy * focus on volunteers not PSC * Apply suggestions from code review Co-authored-by: Mark Prins <1165786+mprins@users.noreply.github.com> * Add a note about response times for volunteers * Break geoserver-secruity email instructions into distinct sentences. * Update SECURITY.md Co-authored-by: Andrea Aime * Update SECURITY.md based on feedback * update in geoserver meeting --------- Co-authored-by: Mark Prins <1165786+mprins@users.noreply.github.com> Co-authored-by: Andrea Aime commit bb44ca1b7df03af4adfa632b5ecbb2447821ad2e Author: Joe <31628530+turingtestfail@users.noreply.github.com> Date: Tue Oct 10 08:25:00 2023 -0400 Update doc/en/user/source/community/opensearch-eo/STAC.rst Co-authored-by: Andrea Aime commit 8d39310f380dc429c3b691b00e10cae9df4390d7 Author: Joseph Miller Date: Sat Sep 9 17:21:47 2023 -0400 [GEOS-11120] Create aggregates filterFunction in OSEO to support STAC Datacube extension implementation First pass with min field lookup added max and distinct bounds and distinct mappropertynametosource and bounds Start on cache started on cache cache key equals hash cache test added a bounds test added cache ttl to ui UI test added ttl units linked service ui to ttl settings actually zero ttl doesn't work docs cleanup more cleanup sortpom aggregate factory clean clean switched to LoadingCache PR changes visitor optimization test added html switched to model stored fixes to uniquevisitor results parsing docs doc cleanup commit b69489c516be8c972ce8626c14f4cd3f672639cc Author: Brad Hards Date: Fri Oct 6 14:34:15 2023 +1100 [GEOS-11146] Fix MBTiles output format test commit 23b5a89df4829e4b6ea7441744fe834633c9eba2 Author: Ángel Heredia <33127189+anthares101@users.noreply.github.com> Date: Mon Oct 9 10:21:10 2023 +0200 [GEOS-11141] Add section about logging configuration hardening (#7144) * Add information about logging configuration hardening --------- Authored-by: Ángel Heredia commit a9731971a3875815b2fbb7b21e549c65a7a85510 Author: Andrea Aime Date: Sat Oct 7 11:34:11 2023 +0200 Revert "Resolve geoserverBaseDir maven property using standard means" This reverts commit f02e73a4856b61820f9b4c676383085aadc486f9. commit da43e5b2b7c74ba442e7c0bee530e152089f0881 Author: Steve Ikeoka Date: Fri Oct 6 13:34:23 2023 -0700 [GEOS-11149] Update response headers for the Style Publisher commit 6f6f8eeae2e74202d17c446f5713774b840cbda8 Author: Gabriel Roldan Date: Fri Oct 6 23:53:12 2023 -0300 Resolve geoserverBaseDir maven property using standard means Use the standard (since maven 3.3.1) ${maven.multiModuleProjectDirectory} expression to resolve the geoserverBaseDir property, replacing the org.commonjava.maven.plugins:directory-maven-plugin plugin. commit f5f00dcdeb6a436eb6488d3bc532d2fe82e2254b Author: Steve Ikeoka Date: Fri Oct 6 13:11:46 2023 -0700 [GEOS-11148] Update response headers for the Resources REST API commit 233905efa3338a1038f1ee9188fadb6b2b5b51d2 Author: Andrea Aime Date: Thu Oct 5 15:41:20 2023 +0200 [GEOS-11145] The GUI "wait spinner" is not visible any longer commit 8e8203df59f2417004453716e017541ff4e67890 Author: Andrea Aime Date: Sat Sep 30 11:38:16 2023 +0200 [GEOS-11140] WPS download can leak image references in the RasterCleaner commit eb025cbad99c6e0d2ade20d43d48a8c9a8e6e48f Author: Andreas Watermeyer Date: Fri Sep 1 13:00:59 2023 +0200 [GEOS-11114] Improve extensibility in Pre-Authentication scenarios commit c2220a0440604fb854f53d6ee5001e40effb23c5 Author: Martin Kalén Date: Mon Oct 2 13:02:29 2023 +0200 [GEOS-10850] Root cause in OGC WFS-T errors, when using verbose service exceptions (#7102) * [GEOS-10850] Include WFS-T root cause on verbose exceptions * Include WFS-T root cause in OGC exception report (only on global verbose exceptions mode) * Centralize WFS-T exception handling to a factory class * Normalize INSERT, UPDATE, DELETE exception prefixes * [GEOS-10850] Compact string handling code Follow up @mprins review: Remove stringbuilders for simple cases / let the Java compiler handle stringbuilding outside of loops, for more readable code. * [GEOS-10850] Adjust WFSTransactionExceptionFactory * Harmonize exception handling for all WFS-T operations, including REPLACE * Extract WFSTransactionExceptionFactory up to abstract base * Make WFSTransactionExceptionFactory visibility package private * De-duplicate message decoration call * [GEOS-10850] Add unit tests * [GEOS-10850] Unit tests auto-closeable/resource clean-up commit bf1a8caee412a40cc3b6196b26fae393d4c45b42 Author: Simon Hofer Date: Sun Oct 1 17:09:51 2023 +0200 [GEOS-11138] Add dtd to jetty context file commit 91f78674219d5d5b5b5215f164c226df660828eb Author: Kylli Ek Date: Sat Sep 30 12:18:43 2023 +0300 OSEO: STAC templates, add v1 to item and collection links (#7137) * add v1 to item and collection links * typo fix in GEOSERVER_DATA_DIR Co-authored-by: Brad Hards * add v1 also to data_dir location --------- Co-authored-by: Brad Hards commit 1c407816d45979bea2b90ba4bd89df9546091adf Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat Sep 30 09:08:30 2023 +0100 Bump org.apache.avro:avro from 1.7.5 to 1.11.3 in /src/community/geomesa (#7139) Bumps org.apache.avro:avro from 1.7.5 to 1.11.3. --- updated-dependencies: - dependency-name: org.apache.avro:avro dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 485f8f4baeed461f6c2c42540e128f42c744a0ff Author: Peter Smythe Date: Sat Sep 23 15:06:04 2023 +0200 Update eclipse.rst I hope this documentation improvement will save someone else hours of debugging time! commit c1f2266ed8670a3e60c400ef03a22334f1447e50 Author: Justin Deoliveira Date: Tue Sep 12 16:00:46 2023 -0600 [GEOS-11122] Loading font from FontCache when specified in legend options commit 13d1dbc3ba8e1c659156691ca9ca112b168f86c2 Author: Peter Rushforth Date: Wed Sep 27 14:58:51 2023 -0400 Update viewer to 0.12.0. Update docs with perf warning post 2.22.x commit 1dc2aac5b6d50d23db23e4e0a33b9525358c853d Author: Peter Smythe Date: Sat Sep 23 21:50:06 2023 +0200 [GEOS-11130] Add a new role > parent role dropdown is not in any discernable order commit 472848d000b08a1a7f6a7acb60d930ab52957d43 Author: Andrea Aime Date: Sat Sep 23 16:43:01 2023 +0200 Revert javadoc maven plugin upgrade, add build to ensure aggregate works commit 0a2e676e4f6bff38cf942479a7084d14f0478fc9 Author: Peter Smythe Date: Sat Sep 23 12:52:25 2023 +0200 Update checkout.txt (#7125) Fix spelling commit e1acedf11afa1e6231966efacc43efe7506fd36e Author: Jody Garnett Date: Fri Sep 22 19:15:24 2023 -0700 [GEOS-11132] Updating printing plugin to mapfish-print-lib 2.3-RC Update to the mapfish-print-lib 2.3-RC release candidate. This reflects the refacoring to GeoTools 30-RC. commit fc2f6140aa862c86da4c6b6d6b582a313c33e4f3 Author: Sebastian Frey Date: Fri Sep 22 19:30:39 2023 +0200 [GEOS-11077] Implement Requirement Class "Search" from OGC API - Features Part 5 proposal (#7040) * [GEOS-11077] Implement search resource * [GEOS-11077] Introduce static SortBy converter * [GEOS-11077] Polish shared search query bean * [GEOS-11077] Implement missing tests * [GEOS-11077] Document search endpoint * [GEOS-11077] Fix openapi.yaml * [GEOS-11077] Fix failing FeatureTests * [GEOS-11077] Fix package path * [GEOS-11077] Fix landing page test * [GEOS-11077] Fix landing page test for tiled-features plugin commit eb4dee78e2371b365a2f00ea8767429646e72fe1 Author: Andrea Aime Date: Fri Sep 22 16:21:06 2023 +0200 Update version numbers for new main commit ae47cf217b250c69b3af5086c5c93eb24174457e Author: Andrea Aime Date: Fri Sep 22 17:27:18 2023 +0200 [GEOS-11131] Update GeoFence to 3.7-RC commit eaf3ecb890a7f0c66503c75e5f67a7408eebafeb Author: Fernando Miño Date: Mon Sep 18 23:43:58 2023 -0700 [GEOS-11103] Upgrade Hazelcast dependency to 5.3.1 (#7087) * [GEOS-11103] Upgrade Hazelcast dependency to 5.3.1 * Add hz-cluster community module fixes * Fix QA warning issue on unchecked conversions * Fix build error with missing types commit 59832b1ef40c36fa8039d00ea653d51f2d627937 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Sep 15 12:44:25 2023 +0200 Bump org.eclipse.jetty:jetty-servlets in /src (#7117) Bumps [org.eclipse.jetty:jetty-servlets](https://github.com/eclipse/jetty.project) from 9.4.51.v20230217 to 9.4.52.v20230823. - [Release notes](https://github.com/eclipse/jetty.project/releases) - [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.51.v20230217...jetty-9.4.52.v20230823) --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-servlets dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit e63d622d2050749830166c4f894883169920596e Author: Joseph Miller Date: Wed Sep 6 13:40:42 2023 -0400 [GEOS-11118] Add Temporal Extents domain and datetime parameter to Maps API unit tests for caps and cleanup added datetime cleanup cleanup2 more cleanup datetime info test cleanup hardcoded gwc version sort pom html format copyright commit dd977175ab70386989619436e7561a3b7f257a85 Author: Andrea Aime Date: Mon Sep 11 17:08:36 2023 +0200 Follow up update of org.geotools.data DataStore interfaces move commit 8d3f88317b4290b8c22b220c95dee585f20239c3 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri Sep 8 16:07:30 2023 +0100 Bump com.github.tomakehurst:wiremock-jre8-standalone in /src (#7112) Bumps [com.github.tomakehurst:wiremock-jre8-standalone](https://github.com/wiremock/wiremock) from 2.35.0 to 2.35.1. - [Release notes](https://github.com/wiremock/wiremock/releases) - [Commits](https://github.com/wiremock/wiremock/compare/2.35.0...2.35.1) --- updated-dependencies: - dependency-name: com.github.tomakehurst:wiremock-jre8-standalone dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 1cb26c9068a5b2deeaaac1cdd9601bcba71afbe7 Author: Daniele Romagnoli Date: Fri Sep 8 10:53:11 2023 +0200 [GEOS-11116] GetMap/GetFeatureInfo with groups and view params can with mismatched layers/params (#7107) Co-authored-by: Andrea Aime commit d0d3bebff87302cc702b34901e5f8f312b60e7ef Author: Peter Smythe Date: Wed Sep 6 19:07:11 2023 +0200 Update index.rst (#7105) commit 9ed3cf783fd73de65322868da216233ba85a7721 Author: Jody Garnett Date: Tue Sep 5 16:22:14 2023 -0700 [GEOS-11070] GeoTools API Change refactoring org.opengis to org.geotools.api commit e48c86c59bed9bb29029482acb30c83ff5e969ac Author: Jody Garnett Date: Tue Sep 5 11:30:05 2023 -0700 [GEOS-11070] Introduce mf.version to pom.xml to manage mapfish-print version commit 09680922fcaa6ff025effc1dd0d8f63ee3d2bb29 Author: Pratik Bandal <136214218+pratikbandalg@users.noreply.github.com> Date: Mon Sep 4 12:59:25 2023 +0530 [GEOS-11102] Locale Update for Test (#7101) commit 59525162fd0904a00c07bc44a6f3d8e4ac29fec7 Author: Ian Turton Date: Fri Sep 1 17:15:29 2023 +0100 remove unneeded import (#7099) commit 3fb446dbc809f6d97d30ad78267dc2c83ae741e5 Author: Peter Smythe Date: Thu Aug 31 09:30:25 2023 +0200 Update index.rst (#7096) Fix grammar commit 120bc476ecdffac3ea7d339f905b96ed5e357d3c Author: Peter Smythe Date: Wed Aug 30 19:59:30 2023 +0200 Update index.rst commit e081d02307ad691dc3ca45144172b169e6ea786e Author: Ian Turton Date: Wed Aug 30 16:28:50 2023 +0200 remove unintended org.opengis.geometry.coordinate.Polygon class (#7095) Co-authored-by: Ian Turton commit 570cf11a1b80abc9d599f1bbc25ec5d4ef9c9c97 Author: Andrea Aime Date: Tue Aug 29 18:53:45 2023 +0200 Remove unecessary org.opengis.geometry.Geometry usage from OGC API modules commit d70a4d8611b13d31f85dd1033445bcc60f740de3 Author: Andrea Aime Date: Fri Aug 25 15:09:47 2023 +0200 Make these tests work offline (no access to xml.xsd) commit 7891b905f1710d2f03274548b44c06ab4cec3bd2 Author: Andrea Aime Date: Fri Aug 25 14:50:49 2023 +0200 GeoServer should not be using Impl classes from the styling package, when possible, nor mutator methods commit f421d35d3dfdb8e607519bc320e9b6d86d18e46c Author: Peter Smythe Date: Tue Aug 22 15:58:25 2023 +0200 Fix order of error message parameters Order of parameters is incorrect. Reference: https://github.com/geoserver/geoserver/blob/main/src/web/core/src/main/resources/GeoServerApplication.properties#L203 commit c811532294e5f66afdaaa32d5da0ef7b9a368c61 Author: Joseph Miller Date: Fri Aug 11 17:42:22 2023 -0400 [GEOS-11100] Add opacity parameter to the layer definitions in WPS-Download download maps opacity value check first unit test and apply alpha and first layer blank cleanup more cleanup doc null check for layer test fix pr cleanup commit 80438c412ebfc21ec850364dc74a1ee0e04c7123 Author: escheper Date: Mon Aug 21 14:20:32 2023 +0200 [GEOS-10452] Fixed Role Services for LDAP/Active Directory. (#6189) * [GEOS-10452] Fixed Role Services for LDAP/Active Directory. Modified several filter strings used for the Spring method template.search(...). When having user CN's with a comma this comma is escaped with a "\". In the new Spring version the escape token should be "\5C" to get proper results when searching on users. * [GEOS-10452] Fixed Role Services for LDAP/Active Directory. Added the function "escapeSearchString()" to modify filter strings used for the Spring method template.search(...). When having for example user CN's with a comma this comma is by default escaped with a "\". In the new Spring version the escape token "\" should be (double) escaped by "\\" to get proper results when searching on users etc. Also an UnitTest is added. * [GEOS-10452] Fixed Role Services for LDAP/Active Directory. Some text/comment and code changes. Removed declaration of additional String variables. commit bb61aac73da7e1f598284bf9137020f5863fb5d0 Author: NielsCharlier Date: Mon Jul 17 15:52:09 2023 +0200 [GEOS-11068] Keycloak: custom admin role not picked up commit c5531a442a8de0461695e74f62a591c48647b4c9 Author: etj Date: Thu Jul 13 14:46:17 2023 +0200 [GEOS-11074] GeoFence may not load property file at boot commit a04c1f0a7bb33806f86a657ba9d21589887793c4 Author: Hans Yperman Date: Mon Jul 17 20:34:39 2023 +0200 [GEOS-10856] geoserver monitor plugin - scaling troubles - rename config properties and alter default cache policy commit e9f4eb1d8d69a047a2323a56d95b9dffb519082d Author: Hans Yperman Date: Wed Jul 5 11:31:40 2023 +0200 [GEOS-10856] geoserver monitor plugin - scaling troubles commit 7727eb1840e5bc15ec05d828220840566e98c5d8 Author: Pratik Bandal Date: Wed Aug 16 22:47:38 2023 +0100 [GEOS-11102]:Allow configuration of the CSV date format commit 0f7815a234edc4e57cc99483e580a01548f4aaef Author: Andrea Aime Date: Wed Aug 16 13:06:38 2023 +0200 Update documentation following up GEOT-7425 commit 7c3272ed93b85ee473cce040b151eef409ed6ba7 Author: Steve Ikeoka Date: Tue Jul 11 12:49:03 2023 -0700 [GEOS-11081] Add option to disable GetFeatureInfo transforming raster layers commit c0e9d2cc1f6e97b8f1b255e8cdfa1bd3cefd7d57 Author: Joseph Miller Date: Wed Aug 9 17:07:48 2023 -0400 [GEOS-11099] ElasticSearch DataStore Documentation Update for RESPONSE_BUFFER_LIMIT commit f54b4b099316046020ce56a6bac505aa6a59f71a Author: mike Date: Mon Aug 7 18:31:38 2023 +0400 Additional remark fixes commit fdacf3f97b02387c58fb2d33037628bf748e7116 Author: Mike Date: Mon Jul 24 09:02:35 2023 +0300 Update doc/en/user/source/community/wps-longitudinal-profile/index.rst Co-authored-by: Matteo V. commit 6f1525f2f02ec57a3967fc440448c50e612c5ef8 Author: mike Date: Fri Jul 21 13:59:06 2023 +0400 Remark fixes commit bc30b25234aabdd9c1eb96e753481a48ec3d056f Author: Mike Date: Wed Jul 19 15:00:24 2023 +0300 Applying suggestions from github Co-authored-by: Andrea Aime commit c4e5f553b273256c113a033f0cbf28ff1d4f366e Author: mike Date: Mon Jul 10 18:49:07 2023 +0300 Some fixes WPS-longitudinal-profile packaging commit 0dc5a5bb52033c61514397ae9f3dc7138a8210bd Author: mike Date: Tue Jun 27 12:14:43 2023 +0300 Doc update commit c2d870987ead363e85b35a9b612dbf239a2e1dd8 Author: mike Date: Mon Jun 12 15:26:06 2023 +0300 - Fixes for altitude calcalation - Changed wkt to ewkt parameter commit dbc28951f8bf1ff77a1a3aa277d95247f42db439 Author: mike Date: Thu Jun 1 13:21:09 2023 +0300 Added ext file for zip association commit f85c4c3032cad6725f520c83436ea0f0a43eeee1 Author: mike Date: Thu Jun 1 11:13:35 2023 +0300 Remark and some terminology fixes commit 21a87dbe5d3ffc20df737f362e082f9528fe5e1b Author: mike Date: Tue May 30 11:20:21 2023 +0300 Added doc and elevation attribute name parameter commit 434e89b3276d5e73b66a9386f0508fd51b9a93a9 Author: Fernando Miño Date: Wed May 17 16:47:52 2023 -0500 [GEOS-11000] WPS process to provide elevation profile for a linestring commit f6fa2d6a304af9dc5c3b6386d084a6bac185df5a Author: Gabriel Roldan Date: Mon Jul 31 11:09:25 2023 -0300 [GEOS-11087] Fix IsolatedCatalogFacade unnecessary performance overhead * Filter the iterator created by list(...) directly instead of building an ArrayList first * Apply in-process filter to iterator in count() only if required, delegate to the proxied facade's count() method if `Dispatcher.REQUEST.get() == null` commit 1638bf53d732253468a7ff4d3cf91df1f340b53b Author: Andrea Aime Date: Fri Jul 21 19:17:32 2023 +0200 [GEOS-11080] Remove ASCII grid output format from WCS commit 9a9aa0490f8bc6d4c6c9842974df9e9414ad8c5f Author: Gabriel Roldan Date: Thu Jul 20 17:09:53 2023 -0300 [GEOS-11090] Use Catalog streaming API in WorkspacePage Make webui's `WorkspaceProvider` use streaming catalog access commit f274fd1457a1ee2094a80752e917e6d78678962f Author: Gabriel Roldan Date: Sun Jul 30 23:14:49 2023 -0300 [GEOS-11089] Performance penalty adding namespaces while loading catalog Use a specialization of `CatalogInfoLookup` for `NamespaceInfo` that speeds up lookup of namespaces by URI. With this patch and GEOS-11088, starting up from a catalog with 120k workspaces and 600k layers, goes from 18 to 4 minutes with the default geoserver loader, and down to less than a minute with the datadir-catalog-loader community module. before after default loader 1113s 294s datadir-catalog-loader (4 trheads) 587s 98s datadir-catalog-loader (8 trheads) 334s 69s datadir-catalog-loader (16 trheads) 245s 57s commit 78ef47620abb5a144aa6978e4b2d352db8ffe7e4 Author: Jan Speckamp Date: Tue Jul 25 14:11:18 2023 +0200 Fix wrong JSON payload schema To POST workspaces via JSON the exact same schema as used by the XML needs to be used. See also: https://gis.stackexchange.com/questions/277837/http-500-error-when-creating-workspace-using-geoserver-rest-api commit 8343a3647dcada4d325fefb2298022a01e9c27fe Author: Jody Garnett Date: Wed Jul 19 22:02:53 2023 -0700 [GEOS-10248] Check WPSInitializer interaction with reload process commit e7d1dd05f4aeebb2e8b22476b955a65793279fa8 Author: NielsCharlier Date: Thu Jul 13 11:14:55 2023 +0200 [GEOS-11073] csw: add url.base property commit 68b7c967af7d3895961d3b6ea43314ac65bda84e Author: NielsCharlier Date: Mon Aug 7 08:54:40 2023 +0200 [GEOS-11086] Taskmanager: database access improvements (#7048) * [TaskManager] don't crash without report service * [TaskManager] exclude outdated slf4j deps * [Taskmanager] fix index without columns bug * [Taskmanager] generic db source uses generic sql types * [Taskmanager] support geometry table * [Taskmanager] support geometry table: documentation * fix spotless commit f123628d7622d96f7f727669c2ee75faa5022667 Author: Ian Turton Date: Sun Aug 6 11:00:31 2023 +0200 [GEOS-11092] make acme-ldap compile with Java 11 (#7059) * make acme-ldap compile with Java 11 * update URL for acme-ldap.jar commit ec163ce9a862b60844380b9b9570b674822bdd37 Author: Roar Brænden Date: Sat Aug 5 00:55:01 2023 +0200 [GEOS-11095] Bump git-commit-id-plugin 4.0.3 -> 4.9.10 (#7058) commit 0d9a44b5a1739ff6f608738835f40b56fee2d36a Author: Gabriel Roldan Date: Thu Aug 3 13:05:12 2023 -0300 [GEOS-11094] Bump org.hsqldb:hsqldb:2.7.1 to 2.7.2 GeoTool’s gt-epsg-hsqldb depends on org.hsqldb:hsqldb:2.7.2, but GeoServer overrides it with 2.7.1. The only GeoServer module directly depending on hsqldb is gs-kml. commit 2579f62980e55d95db6c22f007ed791ea70e2a87 Author: Jody Garnett Date: Thu Jul 27 19:58:08 2023 -0700 remove restput.xml file lurking in base directory Added as part of commit https://github.com/geoserver/geoserver/commit/97038e6f5f9dfca1e6e33f528e55b342ae1219b9 commit 281f616c2fa2840221b82112c21312c122f22f7b Author: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Tue Aug 1 10:16:46 2023 +0200 Use Guava version as specified in parent dependencyManagement (#7037) The parent pom specifies 32.0.0-jre: https://github.com/geoserver/geoserver/blob/f5876797ea151a63b5f1c3fae1e62aa91206da41/src/pom.xml#L1318-L1322 commit c2e8f3e238e4752c2a4818ff2637df46b7dbbe0c Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue Aug 1 09:02:50 2023 +0100 Bump org.springframework.security:spring-security-config in /src (#7052) Bumps [org.springframework.security:spring-security-config](https://github.com/spring-projects/spring-security) from 5.7.8 to 5.7.10. - [Release notes](https://github.com/spring-projects/spring-security/releases) - [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc) - [Commits](https://github.com/spring-projects/spring-security/compare/5.7.8...5.7.10) --- updated-dependencies: - dependency-name: org.springframework.security:spring-security-config dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 7344546b1c78e62d211b7cd9fb400bb229819e65 Author: NielsCharlier Date: Fri Oct 20 10:10:46 2023 +0200 [GEOS-11050] Refactor Resources and Paths API to support alternative ResourceStore implementations - requested changes commit 85ef59bc43d09c99951e2e0312408c63bb86bb3c Author: NielsCharlier Date: Fri Oct 13 14:12:57 2023 +0200 [GEOS-11050] Refactor Resources and Paths API to support alternative ResourceStore implementations commit 9ce161189ce2681ea18a03499ee89bccb7adf372 Author: NielsCharlier Date: Mon Oct 9 16:01:13 2023 +0200 [GEOS-11050] Refactor Resources and Paths API to support alternative ResourceStore implementations commit 0662f1e36f367cadaea0e71315c54b8ae811ca16 Author: NielsCharlier Date: Fri Oct 6 09:18:20 2023 +0200 [GEOS-11050] Refactor Resources and Paths API to support alternative ResourceStore implementations --- .../programming-guide/config/resource.rst | 113 ++++++++--- .../backuprestore/ResourceWriterTest.java | 40 +--- .../org/geoserver/importer/DataFormat.java | 18 +- .../web/resources/PageResourceBrowser.java | 10 +- .../geoserver/web/resources/PanelEdit.java | 10 +- .../geoserver/web/resources/ResourceNode.java | 5 +- .../web/resources/WicketResourceAdaptor.java | 5 +- .../config/GeoServerDataDirectory.java | 3 +- .../platform/GeoServerExtensions.java | 4 +- .../platform/resource/FilePaths.java | 178 ++++++++++++++++++ .../resource/FileSystemResourceStore.java | 22 +-- .../geoserver/platform/resource/Files.java | 25 ++- .../geoserver/platform/resource/Paths.java | 147 ++------------- .../geoserver/platform/resource/Resource.java | 12 ++ .../platform/resource/Resources.java | 33 +++- .../platform/resource/FilePathsTest.java | 85 +++++++++ .../FileSystemResourceTheoryTest.java | 12 +- .../FileWrapperResourceTheoryTest.java | 2 +- .../platform/resource/PathsTest.java | 77 +------- .../platform/resource/ResourceTheoryTest.java | 40 +++- .../web/data/store/panel/FileModel.java | 44 ++--- .../web/wicket/FileExistsValidator.java | 19 +- .../web/data/store/panel/FileModelTest.java | 3 +- 23 files changed, 544 insertions(+), 363 deletions(-) create mode 100644 src/platform/src/main/java/org/geoserver/platform/resource/FilePaths.java create mode 100644 src/platform/src/test/java/org/geoserver/platform/resource/FilePathsTest.java diff --git a/doc/en/developer/source/programming-guide/config/resource.rst b/doc/en/developer/source/programming-guide/config/resource.rst index 984ea59e493..a2a23acf2e4 100644 --- a/doc/en/developer/source/programming-guide/config/resource.rst +++ b/doc/en/developer/source/programming-guide/config/resource.rst @@ -17,21 +17,51 @@ Reference: * `GSIP-136 - Resource Notification Dispatcher `__ * `GSIP-132 - GSIP 132 - Resource Store changes `__ -.. note:: +Parameter Naming Convention +--------------------------- - The methods in the Resource API use String parameter names consistently: +The methods in the Resource API use String parameter names consistently: - * ``path`` relative location of resource within the data directory. +* ``resource path`` parameter is a path to a resource in the resource store. + + In the case of the default FileSystemResourceStore, this is file path that is relative with respect to the data directory. To preserve generic behaviour compatible with any resource store, developers should not assume this to be the case. - Paths are represented similar to a File URL, ``file://`` prefix used internally and - by the resource REST API. - - * ``file`` a java File reference. + Resource paths do not support the `.` and `..` relative directory names. Resource paths use forward slashes, similar to URL's and unix style file paths, and are OS-independent. + +* ``file path`` parameter is an absolute path to a file in the file system. + + While these are OS dependent (with regard to the root of the absolute path) but they must always use forward slashes, as supported by all operating systems and compatible with resource paths as well as file URL's. Note that ``Resource.path()`` for resources obtained by ``Files.asResource(file)`` will return a file path rather than a resource path. + +* ``file`` parameter is a java File reference. + +* ``url`` a location resolved with respect to the resource store. + + A number of special cases developed over time distilled into ``Resources.fromUrl(base,url)`` method. + +General Guidelines +------------------ + +All geoserver developers should be wary of the following general principles when contributing or reviewing: + +* Avoid as much as possible using the file system directly. + + .. note:: The only acceptable exception is when third party libraries require use of a File. Even in this case use Resources API as much as possible. + +* Use Avoid the usage of ``Resource.file()`` and ``Resource.directory()``. - * ``url`` a location resolved with respect to the data directory. + These methods are only necessary for third party libraries that require usage of the file system, when the third party library accepts a file input. - A large number of special cases developed over time distilled into ``Resources.fromUrl(base,url)`` and ``Files.url(base,url)`` methods. + .. note:: The ``file()`` and ``directory()`` methods are never be used for permanent storage. Since there are alternative implementations of the ResourceStore that do not use the file system as underlying storage device, modifying a file on disk does not necessarily have a lasting effect. + +* For custom configuration files with a fixed location, always use ``ResourceStore``. + ``GeoServerResourceLoader`` and ``GeoServerDataDirectory`` from GeoServer 1.0 have been rewritten internally to use Resource API , and should not be used in new code. + +* For URL's provided by user configuration (such as templates, style sheets, etc), use ``Resources.fromURL``. + +* For input/output, always use ``Resource.in()`` and ``Resource.out()``. +x + This approach is compatible with java try-with-resource making for easy to follow code. ResourceStore ------------- @@ -42,10 +72,10 @@ InputStream used to access configuration information: .. code-block:: java - Properties properties = new Properties(); - try (InputStream in = resourceStore.get("module/configuration.properties").in() ){ - properties.load(in); - } + Properties properties = new Properties(); + try (InputStream in = resourceStore.get("module/configuration.properties").in() ){ + properties.load(in); + } An OutputStream is provided for storage (a Resource will be created as needed): @@ -83,9 +113,9 @@ Resource contents are streamed using ``out()`` and ``in()`` methods. The entire Resource ``path()`` provides the complete path relative to the ``ResourceStore`` base directory. Use ``name()`` to retrieve the resource name (as the last component in the path name sequence). -Resource creation is handled in a lazy fashion, use ``file()`` or ``out()`` and the resource will be created as required. +Resource creation is handled in a lazy fashion, use ``out()`` and the resource will be created as required, including any required parent directories are created to produce the completed path. -Use ``dir()`` to create a empty directory. Directories have the ability to ``list()`` their contents: +Directory resources have the ability to ``list()`` their contents: .. code-block:: java @@ -93,7 +123,9 @@ Use ``dir()`` to create a empty directory. Directories have the ability to ``lis ... } -When creating a resource with ``file()``, ``out()`` or ``dir()`` any required parent directories are created to produce the completed path). +The method ``isInternal()`` returns whether the resource is part of the resource store or rather a wrapped file obtained by ``File.asResource``. If this method returns `false` then ``path()`` returns a file path rather than a resource path. + +The methods ``file()`` and ``dir()`` may be used to obtain a file system representation of the resource. Depending on the resource store implementation, this may be the underlying storage entity (in the case of the default FileSystemResourceStore), or merely a cached entity. Changes to these should not be assumed to be permanent. These methods should only be used for input when a third library requires a file and does not support passing on streams. Once created resources can be managed with ``delete()``, ``renameTo(resource)`` methods. @@ -104,7 +136,7 @@ Resource ``lock()`` is also supported. Paths ----- -The ``Paths`` facade provides methods for working with the relative paths used by ResourceStore. +The ``Paths`` facade provides methods for working with resource paths used by ResourceStore. Helpful methods are provided for working with paths and names: @@ -114,14 +146,21 @@ Helpful methods are provided for working with paths and names: * ``sidecar(path, extension)`` * ``names(path)`` processes the path into a list of names as discussed below. -The definition of a path has been expanded to work with the external locations (with ``Paths.isAbsolute(path)`` and ``Paths.names(path)``). - Paths are broken down into a sequence of names, as listed by ``Paths.names(path)``: * ``Path.names("data/tasmania/roads.shp")`` is represented as a list of ``data``, ``tasmania``, ``roads.shp``. -* On linux ``Path.names("/src/gis/cadaster/district.geopkg")`` starts with a marker to indicate an absolute path, resulting in ``/``, ``src``, ``gis``, ``cadaster``, ``district.geopkg``. -* On windows ``Path.names("D:/gis/cadaster/district.geopkg")`` starts with a marker to indicate an absolute path, resulting in ``D:/``, ``gis``, ``cadaster``, ``district.geopkg``. +For file paths that are OS dependent, use ``FilePaths.names(file_path)`` instead. + +FilePaths +--------- + +The ``FilePaths`` facade provides methods for working with file paths. + +Paths are broken down into a sequence of names, as listed by ``Paths.names(path)``: + +* On linux ``FilePath.names("/src/gis/cadaster/district.geopkg")`` starts with a marker to indicate an absolute path, resulting in ``/``, ``src``, ``gis``, ``cadaster``, ``district.geopkg``. +* On windows ``FilePath.names("D:/gis/cadaster/district.geopkg")`` starts with a marker to indicate an absolute path, resulting in ``D:/``, ``gis``, ``cadaster``, ``district.geopkg``. Paths.convert @@ -167,33 +206,45 @@ There are also method for working with directories recursively and filtering con Resources.fromUrl ^^^^^^^^^^^^^^^^^ -There is an important method ``Resources.fromURL( baseDirectory, url)`` that is used by a lot of code trying to understand data references: +The interpretation of the URLs is as follows: + +* ``resource:`` prefix - interpreted as a resource path, returns resource from the resource store. +* ``file:`` prefix with absolute path - interpreted as file path, returns resource created by Files.asResource that refers to file in the file system. +* ``file:`` prefix with relative path (deprecated) - interpreted as a resource path, returns resource from the resource store. +Examples: + +* ``Resources.fromURL( baseDirectory, "resource:images/image.png")`` - resource path +* ``Resources.fromURL( baseDirectory, "file:images/image.png")`` - resource path (deprecated) * ``Resources.fromURL( null, "/src/gis/cadaster/district.geopgk")`` - absolute file path (linux) * ``Resources.fromURL( baseDirectory, "D:\\gis\\cadaster\\district.geopkg")`` - absolute file path (windows) * ``Resources.fromURL( baseDirectory, "file:///D:/gis/cadaster/district.geopkg")`` - absolute file url (windows) * ``Resources.fromURL( baseDirectory, "ftp://veftp.gsfc.nasa.gov/bluemarble/")`` - null (external reference) -For the absolute file references above, see the next section on ``Files.url``. - Files ----- The ``Files`` facade provides methods for working with file objects, and one method of critical importace to the Resource API. -The ``Files.asResource(file)`` method creates a ``ResourceAdapter`` wrapper around an absolute file location. Allows the use of Resource API when working with content outside of the data directory. +Files.asResource +^^^^^^^^^^^^^^^^ + +The ``Files.asResource(file)`` method creates a ``ResourceAdapter`` wrapper around an absolute file location. Allows the use of Resource API when working with content outside of the data directory. This is primary useful for writing test cases. Files.url ^^^^^^^^^ +.. warning:: This method is deprecated along with File use, recommend use of ``Resources.fromURL (baseDirectory, url )`` to obtain Resource. + The other key method is ``Files.url( baseDirectory, url)`` which is used to look up files based on a user provided URL (or path). -* ``Files.fromURL( null, "resource:styles/logo.svg")`` - internal url format restricted to data directory content -* ``Files.fromURL( null, "/src/gis/cadaster/district.geopgk")`` - absolute file path (linux) -* ``Files.fromURL( baseDirectory, "D:\\gis\\cadaster\\district.geopkg")`` - absolute file path (windows) -* ``Files.fromURL( baseDirectory, "file:///D:/gis/cadaster/district.geopkg")`` - absolute file url (windows) -* ``Files.fromURL( baseDirectory, "ftp://veftp.gsfc.nasa.gov/bluemarble/")`` - null (external reference ignored as we cannot determine a file) -* ``Files.fromURL( baseDirectory, "sde://user:pass@server:port")`` - null (custom strings are ignored as we cannot determine a file) + +* ``Files.url( null, "resource:styles/logo.svg")`` - internal url format restricted to data directory content +* ``Files.url( null, "/src/gis/cadaster/district.geopgk")`` - absolute file path (linux) +* ``Files.url( baseDirectory, "D:\\gis\\cadaster\\district.geopkg")`` - absolute file path (windows) +* ``Files.url( baseDirectory, "file:///D:/gis/cadaster/district.geopkg")`` - absolute file url (windows) +* ``Files.url( baseDirectory, "ftp://veftp.gsfc.nasa.gov/bluemarble/")`` - null (external reference ignored as we cannot determine a file) +* ``Files.url( baseDirectory, "sde://user:pass@server:port")`` - null (custom strings are ignored as we cannot determine a file) GeoServerDataDirectory diff --git a/src/community/backup-restore/core/src/test/java/org/geoserver/backuprestore/ResourceWriterTest.java b/src/community/backup-restore/core/src/test/java/org/geoserver/backuprestore/ResourceWriterTest.java index bf337c5a4cb..7e23261d9b2 100644 --- a/src/community/backup-restore/core/src/test/java/org/geoserver/backuprestore/ResourceWriterTest.java +++ b/src/community/backup-restore/core/src/test/java/org/geoserver/backuprestore/ResourceWriterTest.java @@ -55,25 +55,15 @@ public void testResourceInfoAdditionalResourceWriter() throws IOException { GeoServerDataDirectory td = new GeoServerDataDirectory(root); Resource srcTemplatesDir = BackupUtils.dir(dd.get(Paths.BASE), "templates"); - File srcTitleFtl = - Resources.createNewFile( - Files.asResource(new File(srcTemplatesDir.dir(), "title.ftl"))); + File srcTitleFtl = srcTemplatesDir.get("title.ftl").file(); File srcHeaderFtl = - Resources.createNewFile( - Files.asResource( - new File( - Paths.toFile( - dd.get(Paths.BASE).dir(), - Paths.path("workspaces", "gs", "foo", "t1")), - "header.ftl"))); + dd.get(Paths.BASE) + .get(Paths.path("workspaces", "gs", "foo", "t1", "header.ftl")) + .file(); File srcFakeFtl = - Resources.createNewFile( - Files.asResource( - new File( - Paths.toFile( - dd.get(Paths.BASE).dir(), - Paths.path("workspaces", "gs", "foo", "t1")), - "fake.ftl"))); + dd.get(Paths.BASE) + .get(Paths.path("workspaces", "gs", "foo", "t1", "fake.ftl")) + .file(); assertTrue(Resources.exists(Files.asResource(srcTitleFtl))); assertTrue(Resources.exists(Files.asResource(srcHeaderFtl))); @@ -90,21 +80,11 @@ public void testResourceInfoAdditionalResourceWriter() throws IOException { assertTrue(Resources.exists(trgTemplatesDir)); - Resource trgTitleFtl = Files.asResource(new File(trgTemplatesDir.dir(), "title.ftl")); + Resource trgTitleFtl = trgTemplatesDir.get("title.ftl"); Resource trgHeaderFtl = - Files.asResource( - new File( - Paths.toFile( - td.get(Paths.BASE).dir(), - Paths.path("workspaces", "gs", "foo", "t1")), - "header.ftl")); + td.get(Paths.BASE).get(Paths.path("workspaces", "gs", "foo", "t1", "header.ftl")); Resource trgFakeFtl = - Files.asResource( - new File( - Paths.toFile( - td.get(Paths.BASE).dir(), - Paths.path("workspaces", "gs", "foo", "t1")), - "fake.ftl")); + td.get(Paths.BASE).get(Paths.path("workspaces", "gs", "foo", "t1", "fake.ftl")); assertTrue(Resources.exists(trgTitleFtl)); assertTrue(Resources.exists(trgHeaderFtl)); diff --git a/src/extension/importer/core/src/main/java/org/geoserver/importer/DataFormat.java b/src/extension/importer/core/src/main/java/org/geoserver/importer/DataFormat.java index fe52d03769c..2882cdbeb31 100644 --- a/src/extension/importer/core/src/main/java/org/geoserver/importer/DataFormat.java +++ b/src/extension/importer/core/src/main/java/org/geoserver/importer/DataFormat.java @@ -8,6 +8,8 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; +import java.net.MalformedURLException; +import java.net.URL; import java.util.List; import java.util.Map; import java.util.Set; @@ -19,7 +21,7 @@ import org.geoserver.catalog.WorkspaceInfo; import org.geoserver.importer.job.ProgressMonitor; import org.geoserver.platform.GeoServerExtensions; -import org.geoserver.platform.resource.Files; +import org.geoserver.platform.resource.FilePaths; import org.geoserver.platform.resource.Paths; import org.geotools.api.data.DataStoreFactorySpi; import org.geotools.api.data.FileDataStoreFactorySpi; @@ -114,9 +116,19 @@ protected String relativeDataFileURL(String url, Catalog catalog) { return url; } File baseDirectory = catalog.getResourceLoader().getBaseDirectory(); - File f = Files.url(baseDirectory, url); + File f; + try { + f = new File(new URL(url).getFile()); + } catch (MalformedURLException e) { + f = new File(url); + } - return f == null ? url : "file:" + Paths.convert(baseDirectory, f); + String relativePath = Paths.convert(baseDirectory, f); + if (!FilePaths.isAbsolute(relativePath)) { + return "file:" + relativePath; + } else { + return url; + } } public abstract String getName(); diff --git a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PageResourceBrowser.java b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PageResourceBrowser.java index 26fb3684493..13717f8b1c6 100644 --- a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PageResourceBrowser.java +++ b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PageResourceBrowser.java @@ -361,7 +361,7 @@ protected Component getContents(String id) { for (int i = 1; Resources.exists(store().get(dest)); i++) { dest = getIthPath(i); } - editPanel = new PanelEdit(id, dest, true, ""); + editPanel = new PanelEdit(id, store().get(dest), true, ""); return editPanel; } @@ -380,11 +380,7 @@ private String getPath() { protected boolean onSubmit(AjaxRequestTarget target, Component contents) { editPanel.getFeedbackMessages().clear(); String resourcePath = editPanel.getResource(); - if (Paths.isAbsolute(resourcePath)) { - // although ResourceStore.get(path) is limited to relative paths - // out of an abundance of caution we will reject - error(getLocalizer().getString("pathUnsupported", getPage())); - } else if (!Paths.isValid(resourcePath)) { + if (!Paths.isValid(resourcePath)) { try { Paths.valid(resourcePath); } catch (IllegalArgumentException reason) { @@ -465,7 +461,7 @@ public void onClick(AjaxRequestTarget target) { @Override protected Component getContents(String id) { - editPanel = new PanelEdit(id, resource.path(), false, contents); + editPanel = new PanelEdit(id, resource, false, contents); return editPanel; } diff --git a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PanelEdit.java b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PanelEdit.java index 44dae8920b3..2134c3bce3e 100644 --- a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PanelEdit.java +++ b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/PanelEdit.java @@ -11,7 +11,7 @@ import org.apache.wicket.markup.html.panel.FeedbackPanel; import org.apache.wicket.markup.html.panel.Panel; import org.apache.wicket.model.Model; -import org.geoserver.platform.resource.Paths; +import org.geoserver.platform.resource.Resource; /** * Panel for editing. @@ -22,16 +22,16 @@ public class PanelEdit extends Panel { private static final long serialVersionUID = -31594049414032328L; - public PanelEdit(String id, String resource, boolean isNew, String contents) { + public PanelEdit(String id, Resource resource, boolean isNew, String contents) { super(id); - if (Paths.isAbsolute(resource)) { + if (!resource.isInternal()) { // double check resource browser cannot be used to edit - // absolute path locations + // files outside of resource store throw new IllegalStateException("Path location not supported by Resource Browser"); } add(new FeedbackPanel("feedback").setOutputMarkupId(true)); add( - new TextField("resource", new Model<>(resource)) { + new TextField("resource", new Model<>(resource.toString())) { private static final long serialVersionUID = 1019950718780805835L; @Override diff --git a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/ResourceNode.java b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/ResourceNode.java index b7fde2d189b..0b3cc499a70 100644 --- a/src/extension/web-resource/src/main/java/org/geoserver/web/resources/ResourceNode.java +++ b/src/extension/web-resource/src/main/java/org/geoserver/web/resources/ResourceNode.java @@ -9,7 +9,6 @@ import java.util.Set; import java.util.TreeSet; import org.apache.wicket.model.IModel; -import org.geoserver.platform.resource.Paths; import org.geoserver.platform.resource.Resource; import org.geoserver.platform.resource.Resources; import org.geoserver.web.treeview.TreeNode; @@ -30,9 +29,9 @@ public class ResourceNode implements TreeNode, Comparable items = Paths.names(path); + List items = FilePaths.names(path); int index = 0; if (index < items.size()) { diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/FilePaths.java b/src/platform/src/main/java/org/geoserver/platform/resource/FilePaths.java new file mode 100644 index 00000000000..b9b582b7100 --- /dev/null +++ b/src/platform/src/main/java/org/geoserver/platform/resource/FilePaths.java @@ -0,0 +1,178 @@ +/* (c) 2023 Open Source Geospatial Foundation - all rights reserved + * This code is licensed under the GPL 2.0 license, available at the root + * application directory. + */ +package org.geoserver.platform.resource; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.regex.Pattern; +import org.apache.commons.lang3.SystemUtils; + +/** + * Utility class for handling File paths in a consistent fashion. + * + *

File paths differ from resource paths because they refer to a file in the file system rather + * than a resource in the resource store, and therefore they are not OS independent. Absolute paths + * are supported, with Linux systems using a leading {@code /}, and windows using {@code L:}. + * + * @author Jody Garnett + */ +public class FilePaths { + + /** + * Pattern used to recognize absolute path in Windows, as indicated by driver letter reference + * (included {@code :}), followed by as slash character. + * + *

Aside: A drive letter reference on its own results in a relative path (relative to the + * current directory for that drive). + */ + static final Pattern WINDOWS_DRIVE_LETTER = Pattern.compile("^\\w\\:/.*$"); + + /** + * File Path components listed into absolute prefix, directory names, and final file name or + * directory name. + * + *

Relative: Relative paths are represented in a straight forward fashion with: {@code + * Paths.names("data/tasmania/roads.shp"} --> {"data","tasmania","roads.shp"}}. + * + *

Absolute path: When working with an absolute path the list starts with a special + * marker. + * + *

Linux absolute paths are start with leading slash character ({@code / } ).
+ * {@code convert("/srv/gis/cadaster/district.geopkg") --> "/srv/gis/cadaster/district.geopkg"
+ * {@code names("/srv/gis/cadaster/district.geopkg) --> {"/", "srv","gis", "cadaster", + * "district.geopkg"}}.
+ * This agrees with URL representation of + * {@code file:///srv/gis/cadaster/district.geopkg}. + * + *

Windows absolute drive letter and slash ( {@code C:\ } ).
+ * {@code names("D:\\gis\cadaster\district.geopkg") --> {"D:", "gis", "cadaster", + * "district.geopkg"}}. This agrees with URL representation of + * {@code file:///D:/gis/cadaster/district.geopkg}. + * + * @param path Path used for reference lookup + * @return List of path components divided into absolute prefix, directory names, and final file + * name or directory name. + */ + public static List names(String path) { + if (path == null || path.length() == 0) { + return Collections.emptyList(); + } + int index = 0; + int split = path.indexOf('/'); + if (split == -1) { + return Collections.singletonList(path); + } + ArrayList names = new ArrayList<>(3); + String item; + + do { + if (index == 0 && isAbsolute(path)) { + item = path.substring(0, split + 1); + } else { + item = path.substring(index, split); + } + // ignoring zero length items resulting from double slash + // path breaks (occasionally produced when concatenating paths without due care). + if (item.length() != 0) { + names.add(item); + } + index = split + 1; + split = path.indexOf('/', index); + } while (split != -1); + item = path.substring(index); + if (item != null && item.length() != 0 && !item.equals("/")) { + names.add(item); + } + + return names; + } + + /** + * While paths are primarily intended as paths relative to the GeoServer data directory, there + * is some support for absolute paths. + * + *

Linux: Linux absolute paths start with a leading {@code /} character. As this slash + * character is also used as the path separator special handling is required. Notably {@link + * #names(String)} will represent an absolute path as: {@code { "/", "srv" "gis", "cadaster", + * "district.geopkg"}} + * + *

Windows: Windows absolute paths start with a drive letter, colon, and slash + * characters.{@link #names(String)} will represent an absolute path on windows as: {@code { + * "D:/, "gis", "cadaster", "district.geopkg"}} + * + *

Aside: A drive letter reference on its own results in a relative path (relative to the + * current directory for that drive). + * + *

Guidance: On both platforms an absolute path should agree with the file URL + * representation while dropping the {@code file:/} prefix + * + * @param path Resource path reference + * @return {@code true} if path forms an absolute reference to a location outside the data + * directory. + */ + public static boolean isAbsolute(String path) { + return isAbsolute(path, SystemUtils.IS_OS_WINDOWS); + } + + // package visibility for test case coverage on all platforms + static boolean isAbsolute(String path, boolean isWindows) { + if (isWindows) return WINDOWS_DRIVE_LETTER.matcher(path).matches(); + else return path != null && path.startsWith("/"); + } + + /** + * Carefully look up a filesystem root directory (matching {@code /} or {@code C:\} as + * appropriate). + * + * @param name + * @return filesystem root directory matching name, or {@code null} if not found. + */ + private static File root(String name) { + for (File root : File.listRoots()) { + if (root.getPath().equalsIgnoreCase(name)) { + return root; + } + } + return null; + } + + /** + * Convert a file path to file reference for provided base directory. + * + *

This method requires the base directory of the ResourceStore. Note ResourceStore + * implementations may not create the file until needed. + * + *

In the case of an absolute path, base should be null. Both linux {@code /} and windows + * {@code Z:/} absolute resource paths are supported. + * + *

Relative paths when base is {@code null}, are not supported. + * + * @param base Base directory, often GeoServer Data Directory + * @param path Resource path reference + * @return File reference (will be an absolute file reference) + */ + public static File toFile(File base, String path) { + if (isAbsolute(path)) { + if (base != null) { + // To be forgiving we will ignore duplicate slash between base and relative path + if (path.startsWith("/")) { + path = path.substring(1); + } else { + base = null; + } + } + } + for (String item : names(path)) { + if (base == null && isAbsolute(item)) { + base = root(item.replace('/', File.separatorChar)); + } else { + base = new File(base, item); + } + } + return base; + } +} diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/FileSystemResourceStore.java b/src/platform/src/main/java/org/geoserver/platform/resource/FileSystemResourceStore.java index 6e77ff8f09d..264843134b1 100644 --- a/src/platform/src/main/java/org/geoserver/platform/resource/FileSystemResourceStore.java +++ b/src/platform/src/main/java/org/geoserver/platform/resource/FileSystemResourceStore.java @@ -124,7 +124,7 @@ public Resource get(String path) { public boolean remove(String path) { path = Paths.valid(path); - File file = Paths.toFile(baseDirectory, path); + File file = new File(baseDirectory, path); return Files.delete(file); } @@ -134,8 +134,8 @@ public boolean move(String path, String target) { path = Paths.valid(path); target = Paths.valid(target); - File file = Paths.toFile(baseDirectory, path); - File dest = Paths.toFile(baseDirectory, target); + File file = new File(baseDirectory, path); + File dest = new File(baseDirectory, target); if (!file.exists() && !dest.exists()) { return true; // moving an undefined resource @@ -170,8 +170,8 @@ class FileSystemResource implements Resource { File file; public FileSystemResource(String path) { - this.path = path; - this.file = Paths.toFile(baseDirectory, path); + this.file = new File(baseDirectory, path); + this.path = Paths.convert(baseDirectory, file); } @Override @@ -186,7 +186,7 @@ public String name() { @Override public Lock lock() { - return lockProvider.acquire(path); + return lockProvider.acquire(path()); } @Override @@ -452,7 +452,7 @@ public Type getType() { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((path == null) ? 0 : path.hashCode()); + result = prime * result + path.hashCode(); return result; } @@ -462,9 +462,7 @@ public boolean equals(Object obj) { if (obj == null) return false; if (getClass() != obj.getClass()) return false; FileSystemResource other = (FileSystemResource) obj; - if (path == null) { - if (other.path != null) return false; - } else if (!path.equals(other.path)) return false; + if (!file.equals(other.file)) return false; return true; } @@ -485,7 +483,7 @@ public boolean delete() { @Override public boolean renameTo(Resource dest) { - if (dest.parent().path().contains(path())) { + if (dest.parent().path().contains(path)) { LOGGER.log(Level.FINE, "Cannot rename a resource to a descendant of itself"); return false; } @@ -559,7 +557,7 @@ public ResourceNotificationDispatcher getResourceNotificationDispatcher() { v -> v == null ? new FileSystemWatcher( - path -> Paths.toFile(baseDirectory, path)) + path -> new File(baseDirectory, path)) : v); } return instance; diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/Files.java b/src/platform/src/main/java/org/geoserver/platform/resource/Files.java index c932aa41c80..8253975e635 100644 --- a/src/platform/src/main/java/org/geoserver/platform/resource/Files.java +++ b/src/platform/src/main/java/org/geoserver/platform/resource/Files.java @@ -281,6 +281,11 @@ public boolean equals(Object obj) { } else if (!file.equals(other.file)) return false; return true; } + + @Override + public boolean isInternal() { + return false; + } } private static final Logger LOGGER = Logging.getLogger(Files.class); @@ -320,7 +325,9 @@ private Files() { * @param baseDirectory Optional base directory used to resolve relative file URLs * @param url File URL or path relative to data directory * @return File indicated by provided URL location + * @deprecated use {@link Resources#fromURL(Resource, URL)} */ + @Deprecated public static File url(File baseDirectory, String url) { String ss; if (!Objects.equals(url, ss = StringUtils.removeStart(url, "resource:"))) { @@ -374,23 +381,13 @@ public static File url(File baseDirectory, String url) { } /** - * Adapter allowing a File reference to be quickly used a Resource. + * Adapter allowing a File reference to be quickly used as a Resource. * *

This is used as a placeholder when updating code to use resource, while still maintaining - * deprecated File methods: - * - *


-     * //deprecated
-     * public FileWatcher( File file ){
-     *    this.resource = Files.asResource( file );
-     * }
-     * //deprecated
-     * public FileWatcher( Resource resource ){
-     *    this.resource = resource;
-     * }
-     * 
+ * deprecated File methods. It is also useful in writing test cases to simulate interaction with + * the data directory. * - * Note this only an adapter for single files (not directories). + *

Note this only an adapter for single files (not directories). * * @param file File to adapt as a Resource * @return resource adaptor for provided file diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/Paths.java b/src/platform/src/main/java/org/geoserver/platform/resource/Paths.java index 3e8ceec70d7..beb05d32f9d 100644 --- a/src/platform/src/main/java/org/geoserver/platform/resource/Paths.java +++ b/src/platform/src/main/java/org/geoserver/platform/resource/Paths.java @@ -15,7 +15,6 @@ import java.util.Set; import java.util.regex.Pattern; import java.util.stream.Collectors; -import org.apache.commons.lang3.SystemUtils; /** * Utility class for handling Resource paths in a consistent fashion. @@ -23,11 +22,12 @@ *

This utility class is primarily aimed at implementations of ResourceStore and may be helpful * when writing test cases. These methods are suitable for static import. * - *

Resource paths are consistent with file URLs. The base location is represented with "", - * relative paths are not supported. + *

Resource paths are consistent with file URLs. The base location is represented with "", paths + * with . and .. are not supported. * - *

Absolute paths are supported, with Linux systems using a leading {@code /}, and windows using - * {@code L:}. + *

Resource paths are OS independent and refer to resources that are internal to the + * ResourceStore. Note that resources obtained with Files.asResource contain a file path rather than + * a resource path. * * @author Jody Garnett */ @@ -184,7 +184,7 @@ public static String path(boolean strictPath, String... path) { */ static final Pattern WARN = Pattern.compile("^[^:*,\'&?\"<>|]*$"); - /** Set of invalid resource names (currently used to quickly identify relative paths). */ + /** Set of invalid resource names (currently used to quickly identify non-canonical paths). */ static final Set INVALID = new HashSet<>(Arrays.asList(new String[] {"..", "."})); /** @@ -209,7 +209,7 @@ static String toPath(List names) { return reportInvalidPath(names, item); } buf.append(item); - if (i < LIMIT - 1 && !isAbsolute(item)) { + if (i < LIMIT - 1) { buf.append("/"); } } @@ -270,7 +270,7 @@ public static String valid(String path) { } else if (path.isEmpty()) { return Paths.BASE; } else { - for (String component : Paths.names(path)) { + for (String component : names(path)) { if (INVALID.contains(component)) { throw new IllegalArgumentException("Relative paths not supported " + path); } else if (!VALID.matcher(component).matches()) { @@ -282,26 +282,15 @@ public static String valid(String path) { } /** - * Path components listed into absolute prefix, directory names, and final file name or + * Resource Path components listed into absolute prefix, directory names, and final file name or * directory name. * *

Relative: Relative paths are represented in a straight forward fashion with: {@code * Paths.names("data/tasmania/roads.shp"} --> {"data","tasmania","roads.shp"}}. * - *

Absolute path: When working with an absolute path the list starts with a special - * marker. - * - *

Linux absolute paths are start with leading slash character ({@code / } ).
- * {@code convert("/srv/gis/cadaster/district.geopg") --> "/srv/gis/cadaster/district.geopg"
- * {@code names("/srv/gis/cadaster/district.geopkg) --> {"/", "srv","gis", "cadaster", - * "district.geopkg"}}.
- * This agrees with URL representation of - * {@code file:///srv/gis/cadaster/district.geopkg}. - * - *

Windows absolute drive letter and slash ( {@code C:\ } ).
- * {@code names("D:\\gis\cadaster\district.geopkg") --> {"D:", "gis", "cadaster", - * "district.geopkg"}}. This agrees with URL representation of - * {@code file:///D:/gis/cadaster/district.geopkg}. + *

Absolute path: When working with an absolute path the list starts with the base of + * the resource store: {@code Paths.names("/data/tasmania/roads.shp"} --> {"", + * "data","tasmania","roads.shp"}}. * * @param path Path used for reference lookup * @return List of path components divided into absolute prefix, directory names, and final file @@ -319,15 +308,8 @@ public static List names(String path) { ArrayList names = new ArrayList<>(3); String item; - if (isAbsolute(path)) { - item = path.substring(0, split + 1); - } do { - if (index == 0 && isAbsolute(path)) { - item = path.substring(0, split + 1); - } else { - item = path.substring(index, split); - } + item = path.substring(index, split); // ignoring zero length items resulting from double slash // path breaks (occasionally produced when concatenating paths without due care). if (item.length() != 0) { @@ -368,8 +350,11 @@ public static String convert(File base, File file) { if (fileURI.toString().startsWith(baseURI.toString())) { URI relativize = baseURI.relativize(fileURI); - - return relativize.getPath(); + String path = relativize.getPath(); + if (path.endsWith("/")) { + path = path.substring(0, path.length() - 1); + } + return path; } else { return convert(file.getPath()); } @@ -488,7 +473,7 @@ public static String convert(String path, String filename) { throw new NullPointerException("Initial path required to handle relative filenames"); } String filePath = convert(filename); - if (isAbsolute(filePath)) { + if (FilePaths.isAbsolute(filePath)) { throw new IllegalArgumentException( "File location " + filename + " absolute, must be relative to " + path); } @@ -514,98 +499,4 @@ public static String convert(String path, String filename) { } return toPath(resolvedPath); } - - /** - * Pattern used to recognize absolute path in Windows, as indicated by driver letter reference - * (included {@code :}), followed by as slash character. - * - *

Aside: A drive letter reference on its own results in a relative path (relative to the - * current directory for that drive). - */ - static final Pattern WINDOWS_DRIVE_LETTER = Pattern.compile("^\\w\\:/.*$"); - - /** - * While paths are primarily intended as paths relative to the GeoServer data directory, there - * is some support for absolute paths. - * - *

Linux: Linux absolute paths start with a leading {@code /} character. As this slash - * character is also used as the path separator special handling is required. Notably {@link - * #names(String)} will represent an absolute path as: {@code { "/", "srv" "gis", "cadaster", - * "district.geopkg"}} - * - *

Windows: Windows absolute paths start with a drive letter, colon, and slash - * characters.{@link #names(String)} will represent an absolute path on windows as: {@code { - * "D:/, "gis", "cadaster", "district.geopkg"}} - * - *

Aside: A drive letter reference on its own results in a relative path (relative to the - * current directory for that drive). - * - *

Guidance: On both platforms an absolute path should agree with the file URL - * representation while dropping the {@code file:/} prefix - * - * @param path Resource path reference - * @return {@code true} if path forms an absolute reference to a location outside the data - * directory. - */ - public static boolean isAbsolute(String path) { - return isAbsolute(path, SystemUtils.IS_OS_WINDOWS); - } - - // package visibility for test case coverage on all platforms - static boolean isAbsolute(String path, boolean isWindows) { - if (isWindows) return WINDOWS_DRIVE_LETTER.matcher(path).matches(); - else return path != null && path.startsWith("/"); - } - - /** - * Convert a Resource path to file reference for provided base directory. - * - *

This method requires the base directory of the ResourceStore. Note ResourceStore - * implementations may not create the file until needed. - * - *

In the case of an absolute path, base should be null. Both linux {@code /} and windows - * {@code Z:/} absolute resource paths are supported. - * - *

Relative paths when base is {@code null}, are not supported. - * - * @param base Base directory, often GeoServer Data Directory - * @param path Resource path reference - * @return File reference (will be an absolute file reference) - */ - public static File toFile(File base, String path) { - if (isAbsolute(path)) { - if (base != null) { - // To be forgiving we will ignore duplicate slash between base and relative path - if (path.startsWith("/")) { - path = path.substring(1); - } else { - base = null; - } - } - } - for (String item : Paths.names(path)) { - if (base == null && Paths.isAbsolute(item)) { - base = root(item.replace('/', File.separatorChar)); - } else { - base = new File(base, item); - } - } - return base; - } - - /** - * Carefully look up a filesystem root directory (matching {@code /} or {@code C:\} as - * appropriate). - * - * @param name - * @return filesystem root directory matching name, or {@code null} if not found. - */ - private static File root(String name) { - for (File root : File.listRoots()) { - if (root.getPath().equalsIgnoreCase(name)) { - return root; - } - } - return null; - } } diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/Resource.java b/src/platform/src/main/java/org/geoserver/platform/resource/Resource.java index 3b96d729255..2c029c11428 100644 --- a/src/platform/src/main/java/org/geoserver/platform/resource/Resource.java +++ b/src/platform/src/main/java/org/geoserver/platform/resource/Resource.java @@ -206,4 +206,16 @@ default void setContents(byte[] byteArray) throws IOException { IOUtils.write(byteArray, os); } } + + /** + * Flag that says if this resource is a true resource, part of the internal resource store (and + * not for instance a resource adaptor of a file that may be anywhere on the hard drive.) Can + * for instance be used for security purposes. If this returns 'false', then path() will return + * a file path rather than a resource path. + * + * @return + */ + default boolean isInternal() { + return true; + } } diff --git a/src/platform/src/main/java/org/geoserver/platform/resource/Resources.java b/src/platform/src/main/java/org/geoserver/platform/resource/Resources.java index 09d38fc9f95..17685875183 100644 --- a/src/platform/src/main/java/org/geoserver/platform/resource/Resources.java +++ b/src/platform/src/main/java/org/geoserver/platform/resource/Resources.java @@ -572,8 +572,8 @@ public static Resource fromURL(String path) { *

  • Actual URL to external resource using http or ftp protocol - will return null *
  • Resource URL - will support resources from resource store *
  • File URL - will support absolute file references - *
  • File URL - will support relative file references - this is deprecated, use resource: - * instead + *
  • File URL - relative file references are interpreted as resource paths - this is + * deprecated, use resource: instead *
  • Fake URLs - sde://user:pass@server:port - will return null. *
  • path - user supplied file path (operating specific specific) * @@ -593,7 +593,7 @@ public static Resource fromURL(Resource baseDirectory, String url) { // if path looks like an absolute file: URL, try standard conversion if (url.startsWith("file:/")) { try { - return Files.asResource(URLs.urlToFile(new URL(url))); + return fromFile(baseDirectory, URLs.urlToFile(new URL(url))); } catch (Exception e) { // failure, so fall through } @@ -672,8 +672,8 @@ public static Resource fromURL(URL url) { *
  • Actual URL to external resource using http or ftp protocol - will return null *
  • Resource URL - will support resources from resource store *
  • File URL - will support absolute file references - *
  • File URL - will support relative file references - this is deprecated, use resource: - * instead + *
  • File URL - relative file references are interpreted as resource paths - this is + * deprecated, use resource: instead *
  • Fake URLs - sde://user:pass@server:port - will return null. * * @@ -685,12 +685,33 @@ public static Resource fromURL(Resource baseDirectory, URL url) { if (url.getProtocol().equalsIgnoreCase("resource")) { return baseDirectory.get(Paths.convert(url.getPath())); } else if (url.getProtocol().equalsIgnoreCase("file")) { - return Files.asResource(URLs.urlToFile(url)); + return fromFile(baseDirectory, URLs.urlToFile(url)); } else { return null; } } + /** + * Used to look up a resource based on a provided file. + * + * @param baseDirectory base directory for resource: or relative file: paths + * @param file the file + * @return Resource indicated by the provided file. + */ + public static Resource fromFile(Resource baseDirectory, File file) { + String path; + try { + path = Paths.convert(baseDirectory.dir(), file.getCanonicalFile()); + } catch (IOException e) { + path = Paths.convert(baseDirectory.dir(), file); + } + if (FilePaths.isAbsolute(path)) { + return Files.asResource(file); + } else { + return baseDirectory.get(path); + } + } + /** * Create a URL from a resource. * diff --git a/src/platform/src/test/java/org/geoserver/platform/resource/FilePathsTest.java b/src/platform/src/test/java/org/geoserver/platform/resource/FilePathsTest.java new file mode 100644 index 00000000000..0847935a892 --- /dev/null +++ b/src/platform/src/test/java/org/geoserver/platform/resource/FilePathsTest.java @@ -0,0 +1,85 @@ +/* (c) 2023 Open Source Geospatial Foundation - all rights reserved + * This code is licensed under the GPL 2.0 license, available at the root + * application directory. + */ +package org.geoserver.platform.resource; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.util.List; +import org.junit.Test; + +public class FilePathsTest { + + @Test + public void isAbsolutePath() { + assertFalse("data directory relative", FilePaths.isAbsolute("data/tasmania/roads.shp")); + assertTrue( + "linux absolute", FilePaths.isAbsolute("/srv/gis/cadaster/district.geopkg", false)); + assertTrue( + "windows drive absolute", + FilePaths.isAbsolute("D:/gis/cadaster/district.geopkg", true)); + assertFalse("windows drive relative", FilePaths.isAbsolute("D:fail.shp", true)); + } + + @Test + public void naming() throws IOException { + File home = new File(System.getProperty("user.home")).getCanonicalFile(); + String absolutePath = Paths.convert(home.getPath()); + + assertTrue("home", FilePaths.isAbsolute(absolutePath)); + String root = FilePaths.names(absolutePath).get(0); + assertTrue("system root '" + root + "'", FilePaths.isAbsolute(root)); + } + + @Test + public void roundTripFileTests() throws IOException { + File home = new File(System.getProperty("user.home")).getCanonicalFile(); + File directory = new File(home, "directory"); + File file = new File(directory, "file"); + + // absolute paths + absolutePathCheck(home); + absolutePathCheck(directory); + absolutePathCheck(file); + + // relative paths + File base = new File(home, "data"); + relativePathCheck(base, new File("folder")); + relativePathCheck(base, new File(new File("folder"), "file")); + } + + public void absolutePathCheck(File file) { + String filePath = file.getPath(); + String path1 = Paths.convert(filePath); + assertTrue("absolute: " + path1, FilePaths.isAbsolute(path1)); + + List names = FilePaths.names(path1); + assertTrue("absolute: " + names.get(0), FilePaths.isAbsolute(names.get(0))); + + String path2 = Paths.toPath(names); + assertTrue("absolute:" + path2, FilePaths.isAbsolute(path2)); + + File file2 = FilePaths.toFile(null, path2); + assertEquals(file2.getName(), file, file2); + } + + public void relativePathCheck(File base, File file) { + String path1 = Paths.convert(base, file); + assertFalse("absolute: " + path1, FilePaths.isAbsolute(path1)); + + List names = Paths.names(path1); + assertFalse("absolute: " + names.get(0), FilePaths.isAbsolute(names.get(0))); + + String path2 = Paths.toPath(names); + assertFalse("absolute:" + path2, FilePaths.isAbsolute(path2)); + + File file2 = FilePaths.toFile(base, path2); + assertTrue("absolute:" + file2.getPath(), file2.isAbsolute()); + assertEquals(file2.getName(), new File(base, file.getPath()), file2); + } +} diff --git a/src/platform/src/test/java/org/geoserver/platform/resource/FileSystemResourceTheoryTest.java b/src/platform/src/test/java/org/geoserver/platform/resource/FileSystemResourceTheoryTest.java index 8a715f82efe..cc22f16bc3c 100644 --- a/src/platform/src/test/java/org/geoserver/platform/resource/FileSystemResourceTheoryTest.java +++ b/src/platform/src/test/java/org/geoserver/platform/resource/FileSystemResourceTheoryTest.java @@ -105,7 +105,7 @@ public void invalid() { @Test public void fileEvents() throws Exception { - File fileD = Paths.toFile(store.baseDirectory, "DirC/FileD"); + File fileD = new File(store.baseDirectory, "DirC/FileD"); AwaitResourceListener listener = new AwaitResourceListener(); @@ -184,8 +184,8 @@ public void eventNotification() throws InterruptedException { @Test public void directoryEvents() throws Exception { - File fileA = Paths.toFile(store.baseDirectory, "FileA"); - File fileB = Paths.toFile(store.baseDirectory, "FileB"); + File fileA = new File(store.baseDirectory, "FileA"); + File fileB = new File(store.baseDirectory, "FileB"); AwaitResourceListener listener = new AwaitResourceListener(); store.get(Paths.BASE).addListener(listener); @@ -227,7 +227,7 @@ public void directoryEvents() throws Exception { @Test public void emptyDirectoryCreateEventShouldNotBeRaised() throws Exception { final String dirName = testName.getMethodName(); - File watchedDir = Paths.toFile(store.baseDirectory, dirName); + File watchedDir = new File(store.baseDirectory, dirName); FileSystemWatcher watcher = (FileSystemWatcher) store.getResourceNotificationDispatcher(); // set a shorter poll delay @@ -247,7 +247,7 @@ public void emptyDirectoryCreateEventShouldNotBeRaised() throws Exception { @Test public void directoryCreateEventWithContents() throws Exception { final String dirName = testName.getMethodName(); - File watchedDir = Paths.toFile(store.baseDirectory, dirName); + File watchedDir = new File(store.baseDirectory, dirName); File fileA = new File(watchedDir, "FileA"); FileSystemWatcher watcher = (FileSystemWatcher) store.getResourceNotificationDispatcher(); @@ -275,7 +275,7 @@ public void directoryCreateEventWithContents() throws Exception { @Test public void dynamicAsyncDirectoryEvents() throws Exception { final String dirName = testName.getMethodName(); - final File watchedDir = Paths.toFile(store.baseDirectory, dirName); + final File watchedDir = new File(store.baseDirectory, dirName); FileSystemWatcher watcher = (FileSystemWatcher) store.getResourceNotificationDispatcher(); // set a shorter poll delay diff --git a/src/platform/src/test/java/org/geoserver/platform/resource/FileWrapperResourceTheoryTest.java b/src/platform/src/test/java/org/geoserver/platform/resource/FileWrapperResourceTheoryTest.java index f29d8d5d504..f6f50c15d86 100644 --- a/src/platform/src/test/java/org/geoserver/platform/resource/FileWrapperResourceTheoryTest.java +++ b/src/platform/src/test/java/org/geoserver/platform/resource/FileWrapperResourceTheoryTest.java @@ -40,7 +40,7 @@ public static String[] getTestPaths() { */ @Override protected Resource getResource(String path) throws Exception { - File file = Paths.toFile(folder.getRoot(), path); + File file = FilePaths.toFile(folder.getRoot(), path); return Files.asResource(file); } diff --git a/src/platform/src/test/java/org/geoserver/platform/resource/PathsTest.java b/src/platform/src/test/java/org/geoserver/platform/resource/PathsTest.java index dec6e9e1463..623ce8b8217 100644 --- a/src/platform/src/test/java/org/geoserver/platform/resource/PathsTest.java +++ b/src/platform/src/test/java/org/geoserver/platform/resource/PathsTest.java @@ -5,7 +5,6 @@ package org.geoserver.platform.resource; import static org.geoserver.platform.resource.Paths.extension; -import static org.geoserver.platform.resource.Paths.isAbsolute; import static org.geoserver.platform.resource.Paths.name; import static org.geoserver.platform.resource.Paths.names; import static org.geoserver.platform.resource.Paths.parent; @@ -20,7 +19,6 @@ import java.io.File; import java.io.IOException; -import java.util.List; import org.junit.Test; public class PathsTest { @@ -39,16 +37,6 @@ public class PathsTest { final String FILE3 = "directory/folder/file3.txt"; - @Test - public void isAbsolutePath() { - assertFalse("data directory relative", Paths.isAbsolute("data/tasmania/roads.shp")); - assertTrue("linux absolute", Paths.isAbsolute("/srv/gis/cadaster/district.geopkg", false)); - assertTrue( - "windows drive absolute", - Paths.isAbsolute("D:/gis/cadaster/district.geopkg", true)); - assertFalse("windows drive relative", Paths.isAbsolute("D:fail.shp", true)); - } - @Test public void pathTest() { assertEquals(2, names("a/b").size()); @@ -126,6 +114,15 @@ public void validTest() { } } + @Test + public void isValidTest() { + // test paths with . and .. are not valid + for (String name : + new String[] {"directory/./bar", "directory/../bar", "../bar", "./bar"}) { + assertFalse(name, Paths.isValid(name)); + } + } + @Test public void parentTest() { assertEquals(DIRECTORY, parent(FILE)); @@ -144,13 +141,6 @@ public void naming() throws IOException { assertEquals("directory/file.txt", sidecar("directory/file", "txt")); assertEquals("directory/file.prj", sidecar("directory/file.txt", "prj")); - - File home = new File(System.getProperty("user.home")).getCanonicalFile(); - String absolutePath = Paths.convert(home.getPath()); - - assertTrue("home", Paths.isAbsolute(absolutePath)); - String root = Paths.names(absolutePath).get(0); - assertTrue("system root '" + root + "'", Paths.isAbsolute(root)); } @Test @@ -166,7 +156,7 @@ public void convert1() throws IOException { // absolute paths File home = new File(System.getProperty("user.home")).getCanonicalFile(); - assertTrue(isAbsolute(Paths.convert(home.getPath()))); + assertTrue(FilePaths.isAbsolute(Paths.convert(home.getPath()))); } @Test @@ -186,53 +176,6 @@ public void convert2() { assertEquals("file1", Paths.convert(directory, folder, relativePath)); } - @Test - public void roundTripFileTests() throws IOException { - File home = new File(System.getProperty("user.home")).getCanonicalFile(); - File directory = new File(home, "directory"); - File file = new File(directory, "file"); - - // absolute paths - absolutePathCheck(home); - absolutePathCheck(directory); - absolutePathCheck(file); - - // relative paths - File base = new File(home, "data"); - relativePathCheck(base, new File("folder")); - relativePathCheck(base, new File(new File("folder"), "file")); - } - - public void absolutePathCheck(File file) { - String filePath = file.getPath(); - String path1 = Paths.convert(filePath); - assertTrue("absolute: " + path1, isAbsolute(path1)); - - List names = Paths.names(path1); - assertTrue("absolute: " + names.get(0), isAbsolute(names.get(0))); - - String path2 = Paths.toPath(names); - assertTrue("absolute:" + path2, isAbsolute(path2)); - - File file2 = Paths.toFile(null, path2); - assertEquals(file2.getName(), file, file2); - } - - public void relativePathCheck(File base, File file) { - String path1 = Paths.convert(base, file); - assertFalse("absolute: " + path1, isAbsolute(path1)); - - List names = Paths.names(path1); - assertFalse("absolute: " + names.get(0), isAbsolute(names.get(0))); - - String path2 = Paths.toPath(names); - assertFalse("absolute:" + path2, isAbsolute(path2)); - - File file2 = Paths.toFile(base, path2); - assertTrue("absolute:" + file2.getPath(), file2.isAbsolute()); - assertEquals(file2.getName(), new File(base, file.getPath()), file2); - } - @Test public void validationConsistency() { checkValid(false, null); diff --git a/src/platform/src/test/java/org/geoserver/platform/resource/ResourceTheoryTest.java b/src/platform/src/test/java/org/geoserver/platform/resource/ResourceTheoryTest.java index 74d05c22c59..35424d27315 100644 --- a/src/platform/src/test/java/org/geoserver/platform/resource/ResourceTheoryTest.java +++ b/src/platform/src/test/java/org/geoserver/platform/resource/ResourceTheoryTest.java @@ -19,6 +19,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assume.assumeThat; @@ -484,13 +486,43 @@ public void theoryRecursiveDelete(String path) throws Exception { assertTrue(res.delete()); } - @Theory - public void theoryRootIsAbsolute(String path) throws Exception { + public void theoryNoAbsoluteFiles(String path) throws Exception { File home = new File(System.getProperty("user.home")).getCanonicalFile(); - File file = Paths.toFile(home, path); + File file = new File(home, path); final Resource res = getResource(Paths.convert(file.getPath())); - assertTrue(Paths.isAbsolute(res.path())); + assertFalse(FilePaths.isAbsolute(res.path())); + } + + @Theory + public void theoryObsoleteSlashIsIgnored(String path) throws Exception { + final Resource res = getResource(path); + final Resource res2 = getResource("/" + path); + final Resource res3 = getResource(path + "/"); + assertEquals(res, res2); + assertEquals(res.path(), res2.path()); + assertEquals(res, res3); + assertEquals(res.path(), res3.path()); + } + + @Test + public void testPathTraversal() { + assertInvalidPath(".."); + assertInvalidPath("../foo/bar"); + assertInvalidPath("foo/../bar"); + assertInvalidPath("foo/bar/.."); + } + + @Test + public void testPathTraversalWindows() { + assumeTrue(SystemUtils.IS_OS_WINDOWS); + assertInvalidPath("..\\foo\\bar"); + assertInvalidPath("foo\\..\\bar"); + assertInvalidPath("foo\\bar\\.."); + } + + protected final void assertInvalidPath(String path) { + assertThrows(IllegalArgumentException.class, () -> getResource(path)); } @Test diff --git a/src/web/core/src/main/java/org/geoserver/web/data/store/panel/FileModel.java b/src/web/core/src/main/java/org/geoserver/web/data/store/panel/FileModel.java index 2f6cb496450..74dad4b89d7 100644 --- a/src/web/core/src/main/java/org/geoserver/web/data/store/panel/FileModel.java +++ b/src/web/core/src/main/java/org/geoserver/web/data/store/panel/FileModel.java @@ -7,13 +7,15 @@ import java.io.File; import java.io.IOException; +import java.net.MalformedURLException; import java.net.URL; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.wicket.model.IModel; import org.geoserver.platform.GeoServerExtensions; import org.geoserver.platform.GeoServerResourceLoader; -import org.geoserver.platform.resource.Files; +import org.geoserver.platform.resource.FilePaths; +import org.geoserver.platform.resource.Paths; import org.geotools.util.logging.Logging; /** @@ -40,13 +42,6 @@ public FileModel(IModel delegate, File rootDir) { this.rootDir = rootDir; } - private boolean isSubfile(File root, File selection) { - if (selection == null || "".equals(selection.getPath())) return false; - if (selection.equals(root)) return true; - - return isSubfile(root, selection.getParentFile()); - } - @Override public String getObject() { Object obj = delegate.getObject(); @@ -67,27 +62,18 @@ public void detach() { public void setObject(String location) { if (location != null) { - File dataDirectory = canonicalize(rootDir); - File file = canonicalize(new File(location)); - if (isSubfile(dataDirectory, file)) { - File curr = file; - String path = null; - // paranoid check to avoid infinite loops - while (curr != null && !curr.equals(dataDirectory)) { - if (path == null) { - path = curr.getName(); - } else { - path = curr.getName() + "/" + path; - } - curr = curr.getParentFile(); - } - location = "file:" + path; - } else { - File dataFile = Files.url(rootDir, location); - if (dataFile == null || dataFile.equals(file)) { - // not relative to the data directory, does not need fixing - location = "file://" + file.getAbsolutePath(); - } + location = Paths.convert(location); + String locationPath; + try { + locationPath = new URL(location).getFile(); + } catch (MalformedURLException e) { + locationPath = location; + } + locationPath = Paths.convert(rootDir, new File(locationPath)); + if (FilePaths.isAbsolute(locationPath)) { + location = "file://" + locationPath; + } else if (!locationPath.equals(location)) { + location = "file:" + locationPath; } } delegate.setObject(location); diff --git a/src/web/core/src/main/java/org/geoserver/web/wicket/FileExistsValidator.java b/src/web/core/src/main/java/org/geoserver/web/wicket/FileExistsValidator.java index f01fc38aeca..9077806b7de 100644 --- a/src/web/core/src/main/java/org/geoserver/web/wicket/FileExistsValidator.java +++ b/src/web/core/src/main/java/org/geoserver/web/wicket/FileExistsValidator.java @@ -81,16 +81,15 @@ public void validate(IValidatable validatable) { File relFile = null; GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class); - if (baseDirectory != null) { - // local to provided baseDirectory - relFile = Files.url(baseDirectory, uriSpec); - } else if (loader != null) { - // local to data directory? - relFile = - Resources.find( - Resources.fromURL(Files.asResource(loader.getBaseDirectory()), uriSpec), - true); - } + relFile = + Resources.find( + Resources.fromURL( + Files.asResource( + baseDirectory == null + ? loader.getBaseDirectory() + : baseDirectory), + uriSpec), + true); if (relFile == null || !relFile.exists()) { IValidationError err = diff --git a/src/web/core/src/test/java/org/geoserver/web/data/store/panel/FileModelTest.java b/src/web/core/src/test/java/org/geoserver/web/data/store/panel/FileModelTest.java index 3fcd6b59d92..e187e56367f 100644 --- a/src/web/core/src/test/java/org/geoserver/web/data/store/panel/FileModelTest.java +++ b/src/web/core/src/test/java/org/geoserver/web/data/store/panel/FileModelTest.java @@ -14,6 +14,7 @@ import java.util.Map; import org.apache.wicket.model.Model; import org.geoserver.data.test.MockData; +import org.geoserver.platform.resource.Paths; import org.geoserver.web.util.MapModel; import org.junit.Before; import org.junit.Test; @@ -39,7 +40,7 @@ public void testAbsolute() throws IOException { FileModel model = new FileModel(new Model<>(), root); model.setObject(f.getAbsolutePath()); String path = model.getObject(); - assertEquals("file://" + f.getAbsolutePath(), path); + assertEquals("file://" + Paths.convert(f.getAbsolutePath()), path); } finally { f.delete(); }