build(deps): bump xmlutil serialization to 1.0.1 and harden data layer parsers - #1741
Merged
Conversation
…r parsers
- Update io.github.pdvrieze.xmlutil:serialization in libs.versions.toml from 0.91.3 to 1.0.1.
- Migrate XML {} configuration DSL in GpxParser and KmlParser by promoting isCollectingNSAttributes to the top-level XML {} builder per xmlutil 1.0.0+ DSL changes.
- Update expected exception for malformed KML coordinate tests in KmlParserTest from XmlParsingException to XmlException per xmlutil 1.0.x error hierarchy.
- Harden GeoJSON, KML, and GPX coordinate models (Coordinates, LatLngAlt, Wpt) by enforcing finiteness checks in init blocks and serializers to prevent NaN/Infinity poisoning from reaching LatLng/LatLngBounds.
- Sanitize non-finite numeric style properties (stroke-width, fill-opacity, stroke-opacity, width, scale) in GeoJsonMapper and KmlMapper to safe visual defaults.
- Add comprehensive SecurityHardeningTest suite covering adversarial coordinate poisoning and non-finite style injection across all three spatial formats.
Contributor
Code Coverage
Files
|
kikoso
reviewed
Aug 5, 2026
| ) | ||
| ) { | ||
| init { | ||
| require(lat.isFinite() && lon.isFinite() && (ele == null || ele.isFinite())) { |
Collaborator
There was a problem hiding this comment.
I had to think for a millisecond what was "ele", not sure if it could be worth adding the entire name.
dkhawk
added a commit
that referenced
this pull request
Aug 5, 2026
- Sync with latest origin/main containing PR #1740 (Gradle 9.6.1 / CI fixes), PR #1739 (LatLonQuad GroundOverlays), PR #1730 (clustering updateItem fix), and PR #1741 (XML serialization hardening). - Preserve all backwards-compatible @deprecated com.google.maps.android.ktx typealiases and forwarding bridges for 6.0.0-rc01. - Add play-services-location and mockito-kotlin dependencies to libs.versions.toml for KTX location module tests.
Contributor
Author
|
@kikoso Thanks for the feedback! To address readability without breaking binary or source API compatibility for existing callers:
|
…s review feedback from @kikoso
dkhawk
force-pushed
the
chore/update-xmlutil-serialization
branch
from
August 5, 2026 17:26
b087bd9 to
71a8201
Compare
Collaborator
|
Ready to be merged IMO! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
io.github.pdvrieze.xmlutil:serializationingradle/libs.versions.tomlfrom0.91.3to1.0.1.XML {}configuration DSL inGpxParser.ktandKmlParser.ktby promotingisCollectingNSAttributes = truefromdefaultPolicy {}to the top-levelXML {}builder perxmlutil 1.0.0+DSL changes.KmlParserTest.ktfromXmlParsingExceptiontoXmlExceptionper the updatedxmlutil 1.0.xerror hierarchy.Coordinates(GeoJSON),LatLngAlt(KML), andWpt(GPX)initblocks to preventNaN/Infinitycoordinate poisoning from reachingLatLngorLatLngBounds.Builder.stroke-width,fill-opacity,stroke-opacity,width,scale) inGeoJsonMapper.ktandKmlMapper.ktto safe default visual styles rather than crashing or rendering invalid alpha/width values.SecurityHardeningTest.ktunit test suite covering adversarial coordinate poisoning and non-finite style attribute injection across GeoJSON, KML, and GPX formats.Reviewers
Test Plan
SecurityHardeningTest.ktpass cleanly.GpxParserTest.ktandKmlParserTest.ktpass cleanly.:library,:clustering,:heatmaps,:data,:ui,:visual-testing) pass (./gradlew testDebugUnitTest).