Skip to content

Fix URL encoding of query strings in DSOURLField - #1311

Merged
pstokkink merged 1 commit into
Amsterdam:masterfrom
Bastiaandupon:fix/dso-url-field-query-encoding
Oct 28, 2026
Merged

pstokkink merged 1 commit into
Amsterdam:masterfrom
Bastiaandupon:fix/dso-url-field-query-encoding

Conversation

@Bastiaandupon

Copy link
Copy Markdown
Contributor

Use with care: vibecoded

DSOURLField used quote() with the default safe="/", which encoded the "=" and "&" of query strings into %3D and %26.

  • This broke URL fields such as kaartlaagUrl and wmsCapabilitiesUrl. Characters with a meaning in the path/query (RFC 3986) are now left intact, including "%" so already encoded URLs are not encoded twice.
  • Spaces still become %20.

DSOURLField used quote() with the default safe="/", which encoded the
"=" and "&" of query strings into %3D and %26. This broke URL fields
such as kaartlaagUrl and wmsCapabilitiesUrl. Characters with a meaning
in the path/query (RFC 3986) are now left intact, including "%" so
already encoded URLs are not encoded twice. Spaces still become %20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pstokkink pstokkink left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gegeven dat deze class alleen urls serialized die uit de db komen, en niets doet met request urls enzo lijkt dit me SAFE genoeg.

@pstokkink
pstokkink merged commit 5d18890 into Amsterdam:master Oct 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants