From 51fbc6a7405ba16258902ea7ed473f6f61af8a5a Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 10 Sep 2026 21:58:19 -0400 Subject: [PATCH 1/4] safeguard item template hrefs --- pygeoapi/templates/collections/items/item.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygeoapi/templates/collections/items/item.html b/pygeoapi/templates/collections/items/item.html index 705f9057cc..e20f15814d 100644 --- a/pygeoapi/templates/collections/items/item.html +++ b/pygeoapi/templates/collections/items/item.html @@ -5,7 +5,9 @@ {# Optionally renders an img element, otherwise standard value or link rendering #} {% macro render_item_value(v, width) -%} {% set val = v | string | trim %} - {% if val|length and val.lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) %} + {% if (val|length and val.lower().startswith(('http://', 'https://')) and + val.lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) + ) %} {# Ends with image extension: render img element with link to image #} {{ val.split('/') | last }} {% elif v is string or v is number %} From 4ffb01dfbbb5d64f6102063dac337e14e2f01a72 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 10 Sep 2026 22:37:11 -0400 Subject: [PATCH 2/4] update --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e60406e78..0be02bb82e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,6 +130,7 @@ jobs: pip3 install -r requirements-pubsub.txt pip3 install . pip3 install GDAL==`gdal-config --version` + pip3 install "pyproj<3.8" - name: setup test data ⚙️ run: | pybabel compile -d locale -l es From 2622e3b1a33da75c21d960fd284c3f97893827ad Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 10 Sep 2026 23:03:07 -0400 Subject: [PATCH 3/4] update --- .github/workflows/main.yml | 1 - tests/other/test_crs.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0be02bb82e..5e60406e78 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,7 +130,6 @@ jobs: pip3 install -r requirements-pubsub.txt pip3 install . pip3 install GDAL==`gdal-config --version` - pip3 install "pyproj<3.8" - name: setup test data ⚙️ run: | pybabel compile -d locale -l es diff --git a/tests/other/test_crs.py b/tests/other/test_crs.py index b84a01ea94..25762e4376 100644 --- a/tests/other/test_crs.py +++ b/tests/other/test_crs.py @@ -270,7 +270,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-explicit-input-crs-ewkt' ), @@ -281,7 +281,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-explicit-input-crs-filter-crs' ), @@ -292,7 +292,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-ewkt-crs-overrides-filter-crs' ), From f66946bd15eed2db5199c5920d0a8e5d63ffcede Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 10 Sep 2026 23:38:30 -0400 Subject: [PATCH 4/4] update --- .github/workflows/main.yml | 1 + tests/other/test_crs.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e60406e78..0be02bb82e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,6 +130,7 @@ jobs: pip3 install -r requirements-pubsub.txt pip3 install . pip3 install GDAL==`gdal-config --version` + pip3 install "pyproj<3.8" - name: setup test data ⚙️ run: | pybabel compile -d locale -l es diff --git a/tests/other/test_crs.py b/tests/other/test_crs.py index 25762e4376..b84a01ea94 100644 --- a/tests/other/test_crs.py +++ b/tests/other/test_crs.py @@ -270,7 +270,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-explicit-input-crs-ewkt' ), @@ -281,7 +281,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-explicit-input-crs-filter-crs' ), @@ -292,7 +292,7 @@ def test_transform_bbox(): None, pygeofilter.ast.GeometryIntersects( pygeofilter.ast.Attribute(name='geometry'), - Geometry({'type': 'Point', 'coordinates': (2313681.8086284213, 4641307.939955419), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa + Geometry({'type': 'Point', 'coordinates': (2313681.808628421, 4641307.939955416), 'crs': {'properties': {'name': 'urn:ogc:def:crs:EPSG::3004'}}}) # noqa ), id='unnested-geometry-transformed-coords-ewkt-crs-overrides-filter-crs' ),