summaryrefslogtreecommitdiff
path: root/tests/gis_tests
AgeCommit message (Collapse)Author
14 daysFixed CVE-2026-15830 -- Mitigated potential DoS via nested geometry collections.Jacob Walls
Since deeply nested geometry collections can lead to fatal errors in GEOS, a new `max_geom_collections` argument on geometry model and form fields, passed down to `GEOSGeometry` itself, allows limiting either depth (WKT) or total number (WKB) before reaching GEOS. Thanks Andrew MacPherson and kimchunbok_ for the reports, and Natalia Bidart, Simon Charette, and Sarah Boyce for reviews.
14 daysFixed CVE-2026-15307 -- Blocked raster strings and dicts in spatial lookups.Jacob Walls
Spatial lookups optimistically parse values as rasters before retrying as geometries. If a malicious value reached the GDALRaster constructor, depending on the raster driver, it might write to disk or fetch from the network regardless of the constructor's `write=False` default argument. Although this works as designed for model field assignment, this is potentially unexpected for querying, for example, in the admin's changelist view, which allows staff users to execute arbitrary lookups on models registered with the admin. Network rasters didn't even work in lookup contexts before, providing further evidence that this use case was unintentional. (The failure point was after the fetching, however.) Now, strings and dicts representing rasters are rejected by spatial lookups. To opt in to using them, wrap them in a `GDALRaster` first. Although it would simplify the implementation to try geometries before rasters (instead of stashing a raster exception and raising it later), we maintain the current order, which has been stable for a decade. Thanks Bence Nagy, localhost-detect, and kimchunbok_ for providing information useful in evaluating this report. Thanks Simon Charette, Natalia Bidart, and Sarah Boyce for reviews.
2026-08-02Fixed #37242 -- Fixed reading null time fields in LayerMapping.Jacob Walls
Follow-up to 75d627888bf42f8de6064a0bd665c98c0df66c55.
2026-07-31Fixed #36626 -- Preserved milliseconds in DataSource time fields.Francesco Bruni
2026-07-31Fixed #37236 -- Allowed altering spatial indexes on RasterField.Mariano Baragiola
2026-07-23Refs #36694 -- Skipped GIS test needing spatial index on Oracle.Jacob Walls
2026-07-20Fixed #36694 -- Restored missing Index options in ↵Clifford Gama
PostGISSchemaEditor._create_spatial_index_sql(). Thanks Luciano de la Iglesia for the report, and Simon Charette and David Smith for the reviews.
2026-07-14Closed temporary files in GDALRasterTests.Jacob Walls
2026-07-06Fixed CVE-2026-53877 -- Prevented heap buffer over-read when creating ↵Jacob Walls
GDALRaster from bytes. Previously, `sys.getsizeof()` included the size of the `PyBytesObject` wrapper which is bigger. `len(bytes_object)` is the accurate size. Thanks Bence Nagy for the report, and Simon Charette for reviews.
2026-05-11Fixed #36593 -- Deprecated QuerySet.select_related() with no arguments.Adam Johnson
This commit deprecates the "fetch all relations" form of `QuerySet.select_related()` due to its poor performance characteristics, and updates several tests relying on that feature to ignore the new warning.
2026-05-11Refs #36593 -- Used explicit select_related() calls in tests.Adam Johnson
This commit prepares for the deprecation of select_related() without arguments by updating tests that used select_related() as a shorthand to explicitly specify the related fields to be selected.
2026-02-19Fixed #36929 -- Dropped support for GEOS 3.9.Pravin Kamble
Thanks David Smith for report and Tim Graham for review.
2026-02-10Added various missing test skips observed on MongoDB.Tim Graham
2026-02-09Added DatabaseFeatures.supports_inspectdb.Tim Graham
Needed by MongoDB.
2026-02-09Refs #36036 -- Added m dimension to GEOSCoordSeq.David Smith
2026-02-06Fixed #36246 -- Caught GDALException in BaseGeometryWidget.deserialize.JaeHyuck Sa
Signed-off-by: JaeHyuck Sa <wogur981208@gmail.com>
2026-02-03Fixed CVE-2026-1207 -- Prevented SQL injections in RasterField lookups via ↵Jacob Walls
band index. Thanks Tarek Nakkouch for the report, and Simon Charette for the initial triage and review.
2026-01-20Refs #36382 -- Fixed GDAL_VERSION comparison in gdal_tests.Jacob Walls
Tests regression in 0d31ca98830542088299d2078402891d08cc3a65.
2026-01-20Refs #36639 -- Updated test migrations to match models.Skyiesac
2026-01-16Refs #36382 -- Updated GDAL tests for Memory driver deprecation in GDAL 3.11.David Smith
Follow up to fb0d463b1f88a38f3e7cd8d66ed6c69309f97901 Since GDAL 3.11 the Memory driver is deprecated with its functionality merged into the MEM dataset driver. https://gdal.org/en/stable/drivers/vector/memory.html
2025-12-28Added some skips to GIS tests.Tim Graham
Also replaced some DatabaseFeatures.supports_<foo>_lookup attributes with @skipUnlessGISLookup.
2025-12-09Added tests for MultiPointField, MultiLineStringField, and ↵Tim Graham
GeometryCollectionField.
2025-11-25Fixed #35783 -- Added NumDimensions GIS database function and ↵David Smith
__num_dimensions lookup.
2025-11-22Fixed #35774 -- Dropped support for GEOS 3.8.David Smith
GEOS 3.8 (released Oct-2019) will be more than 5 years old when Django 6.1 is released (Aug-2026).
2025-10-20Removed duplicate display_raw key in expected data in GeometryWidgetTests.Emmanuel Ferdman
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-10-20Fixed RelatedGeoModelTest.test_related_union_aggregate() test on Oracle and ↵Mariusz Felisiak
GEOS 3.12+.
2025-10-17Refs #35844 -- Relaxed GEOSIOTest.test02_wktwriter() test assertion.Mariusz Felisiak
2025-10-15Skipped GISFunctionsTests.test_geometry_type() test for MultiPoint on ↵Mariusz Felisiak
MariaDB and GEOS 3.12+. GEOSWKTWriter_write() behavior was changed in GEOS 3.12+ to include parentheses for sub-members (https://github.com/libgeos/geos/pull/903). MariaDB doesn't accept WKT representations with additional parentheses for MultiPoint. This is an accepted bug (MDEV-36166) in MariaDB that should be fixed in the future: - https://jira.mariadb.org/browse/MDEV-36166
2025-10-15Moved object creation to subTest() in GISFunctionsTests.test_geometry_type() ↵Mariusz Felisiak
test.
2025-09-22Refs #33783 -- Added IsEmpty GIS database function and __isempty lookup on ↵David Smith
SpatiaLite.
2025-09-16Fixed OGRInspectTest.test_time_field with memory Spatialite database.David Smith
2025-08-21Fixed #36382 -- Confirmed support for GDAL 3.11.David Smith
TIGER driver was removed in GDAL 3.11. https://github.com/OSGeo/gdal/commit/eb793be0395ccba50e053a46b30cb90deb530990
2025-08-05Fixed #36537 -- Ensured unique HTML IDs for geometry widget option scripts ↵Matthias Kestenholz
in the admin. This work amends the code from f2f6046c0f92ff1faed057da0711ac478eef439c where multiple geometry widgets rendered `<script>` elements in the admin with the same HTML `id`, resulting in invalid HTML and fragile JavaScript selectors. Refs #25706. This change uses the widget's textarea ID to generate a unique `id` for each JSON options `<script>`, ensuring valid and robust markup. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Refs #36500 -- Shortened some long docstrings and comments.Mike Edmunds
Manually reformatted some long docstrings and comments that would be damaged by the to-be-applied autofixer script, in cases where editorial judgment seemed necessary for style or wording changes.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-07-23Refs #36009 -- Adjusted ↵David Smith
gis_tests.geoapp.tests.GeoLookupTest.test_relate_lookup for bug in PostGIS. ST_Relate() with PostGIS 3.5 and GEOS 3.13 gives a different result when a series of calls are made vs. single call of the same function. The fix for this is expected to be released in PostGIS 3.5.4 and 3.6.0. https://lists.osgeo.org/pipermail/postgis-devel/2025-July/030581.html https://trac.osgeo.org/postgis/ticket/5938
2025-07-21Improved consistency of GEOS error messages.David Smith
2025-07-21Improved iteration of geometries in GEOS tests.David Smith
2025-07-21Added message to TypeError exceptions in GEOS WKTReader and WKBReader.David Smith
2025-07-21Used assertRaisesMessage and subTest where appropriate in GEOS tests.David Smith
2025-07-20Fixed #28696 -- Added GeometryType GIS database function and __geom_type lookup.Ahmed Ibrahim
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2025-06-25Fixed #36471 -- Added support for __coveredby GIS lookup and Collect, ↵Mariusz Felisiak
GeoHash, IsValid on MariaDB 12.0.1+.
2025-06-12Fixed #25706 -- Refactored geometry widgets to remove inline JavaScript.Claude Paroz
Refactored GIS-related JavaScript initialization to eliminate inline scripts from templates. Added support for specifying a base layer using the new `base_layer_name` attribute on `BaseGeometryWidget`, allowing custom map tile providers via user-defined JavaScript. As a result, the `gis/openlayers-osm.html` template was removed. Thanks Sarah Boyce for reviews. Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2025-06-10Fixed #36448 -- Fixed GeoDjango spelling in test_commands.py docstrings.nakano
2025-06-05Added validation to BaseSpatialFeatures.has_<Func>_function.Tim Graham
2025-04-09Refs #36036 -- Removed unsupported 4D GEOS tests.Andrew
2025-04-04Fixed #36289 -- Fixed bulk_create() crash with nullable geometry fields on ↵Simon Charette
PostGIS. Swapped to an allow list instead of a deny list for field types to determine if the UNNEST optimization can be enabled to avoid further surprises with other types that would require further specialization to adapt. Regression in a16eedcf9c69d8a11d94cac1811018c5b996d491. Thanks Joshua Goodwin for the report and Sarah Boyce for the test.
2025-03-11Fixed #36177 -- Added a trailing newline to JSON serializer. (#19232)Tom Carrick
2025-03-01Applied Black's 2025 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/25.1.0