Skip to content

Ensure that semicolons in query and fragment strings are url-encoded.#9

Open
mbjones wants to merge 1 commit into
developfrom
bug-08-unescaped-semicolon
Open

Ensure that semicolons in query and fragment strings are url-encoded.#9
mbjones wants to merge 1 commit into
developfrom
bug-08-unescaped-semicolon

Conversation

@mbjones

@mbjones mbjones commented Jul 1, 2026

Copy link
Copy Markdown
Member

Changed code so that semicolons ; are no longer in the reserved set and will be url-encoded in the query string and fragment string portions of a URL. Adjusted the tests to match.

Closes issue #8

@mbjones mbjones added this to the d1common-2.4.3 milestone Jul 1, 2026
@mbjones mbjones self-assigned this Jul 1, 2026
Copilot AI review requested due to automatic review settings July 1, 2026 02:58
@mbjones mbjones linked an issue Jul 1, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates EncodingUtilities so semicolons (;) are no longer treated as unescaped characters in URL query and fragment encoding, ensuring they are percent-encoded (%3B) to avoid downstream 403 responses (per issue #8).

Changes:

  • Removed ; from the fragment unescaped character set, which also affects the derived query unescaped set.
  • Updated the UTF-8 encoding test vector file to expect %3B for semicolons in query and fragment cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main/java/org/dataone/service/util/EncodingUtilities.java Stops allowing ; as unescaped in fragments (and therefore query segments), so it will be encoded.
src/test/resources/org/dataone/service/encodingTestSet/testUnicodeStrings.utf8.txt Updates expected encodings to reflect %3B for semicolons in query/fragment test cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improperly unescaped ; in query and fragment strings

2 participants