Skip to content

Fix URL signing api for URLs containing special characters - #12435

Open
ErykKul wants to merge 17 commits into
developfrom
fix-url-signing-special-characters
Open

Fix URL signing api for URLs containing special characters#12435
ErykKul wants to merge 17 commits into
developfrom
fix-url-signing-special-characters

Conversation

@ErykKul

@ErykKul ErykKul commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:
Bug fix; URL signing for URLs containing special characters broken in 6.10, this PR fixes the introduced bug.

Which issue(s) this PR closes:
Issue not created, bug fixed directly here.

Special notes for your reviewer:
Added tests to prevent regression. Also, API requires now the signing secret to be set, otherwise it will not work.

Suggestions on how to test this:
No special testing needed, the unit tests should be sufficient.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No

Is there a release notes update needed for this change?:
Yes, included.

Additional documentation:
No

@ErykKul ErykKul added Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug - Blocker Bug is blocking user work, no workaround available labels Jun 4, 2026
@ErykKul ErykKul added this to the 6.11 milestone Jun 4, 2026
@ErykKul ErykKul moved this to Ready for Review ⏩ in IQSS Dataverse Project Jun 4, 2026
@coveralls

coveralls commented Jun 4, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 24.989%fix-url-signing-special-characters into develop. No base build found for develop.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ErykKul ErykKul moved this from Ready for Review ⏩ to In Progress 💻 in IQSS Dataverse Project Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

Test Results

403 tests  ±0   388 ✅ ±0   34m 45s ⏱️ + 9m 27s
 55 suites ±0    15 💤 ±0 
 55 files   ±0     0 ❌ ±0 

Results for commit 06f539e. ± Comparison against base commit df71344.

♻️ This comment has been updated with latest results.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread doc/sphinx-guides/source/installation/config.rst
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@pdurbin pdurbin removed this from the 6.11 milestone Jun 8, 2026
ErykKul added 2 commits June 16, 2026 13:29
…cial-characters' into fix-url-signing-special-characters

# Conflicts:
#	doc/release-notes/fix-url-signing-special-characters.md
#	src/main/java/edu/harvard/iq/dataverse/api/Access.java
@github-actions

This comment has been minimized.

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Jun 16, 2026
@stevenwinship stevenwinship removed their assignment Jun 16, 2026
@cmbz cmbz added FY26 Sprint 25 FY26 Sprint 25 (2026-06-03 - 2026-06-17) FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) labels Jun 17, 2026
@cmbz cmbz added the FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) label Jul 1, 2026
@github-actions

This comment has been minimized.

…pping, docs and tests #12435

- Gate the four signed-URL POST /api/access endpoints before any guestbook-response
  or MakeDataCount side effects, via requireSigningSecretForSignedUrl(); keep a silent
  backstop in returnSignedUrl for the callers that discard its response. Generic error
  message for these guest-reachable endpoints, actionable detail in the server log.
- stripReservedParameters: preserve empty query segments and fragments byte-for-byte
  (split("&", -1), fragment split off before query surgery).
- Log a warning and hide the permissions-history CSV link when no signing secret is set.
- Tests: unsigned-fallback path, signUrlWithApiKey/isSigningSecretConfigured, strip edge cases.
- Docs: signing-secret now documented as required in native-api.rst; fix env var name
  DATAVERSE_API_SIGNING_SECRET in config.rst; conditional-signing notes in external-tools.rst
  and globus-api.rst; release note lists all gated endpoints and the real error message.
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@pdurbin pdurbin added the Status: Merge Conflicts Merge conflicts must be resolved. label Jul 14, 2026
@pdurbin pdurbin moved this from Ready for QA ⏩ to In Review 🔎 in IQSS Dataverse Project Jul 14, 2026
@pdurbin pdurbin self-assigned this Jul 14, 2026
@cmbz cmbz added the FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) label Jul 15, 2026
@pdurbin pdurbin moved this from In Review 🔎 to On Hold ⌛ in IQSS Dataverse Project Jul 17, 2026
@pdurbin

pdurbin commented Jul 17, 2026

Copy link
Copy Markdown
Member

@ErykKul I'm putting this on hold for now since I heard you're on vacation until Aug 4. Please resolve merge conflicts when you get back. Thanks!

…ecial-characters

# Conflicts:
#	src/main/java/edu/harvard/iq/dataverse/api/Access.java
@ErykKul

ErykKul commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

@pdurbin, I did the merge. This one was easy. If there is something bigger, then I will pick it up after Aug 4.

@github-actions

Copy link
Copy Markdown

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:fix-url-signing-special-characters
ghcr.io/gdcc/configbaker:fix-url-signing-special-characters

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@pdurbin pdurbin moved this from On Hold ⌛ to Ready for QA ⏩ in IQSS Dataverse Project Jul 20, 2026
@cmbz cmbz added the FY27 Sprint 3 FY27 Sprint 3 (2026-07-29 - 2026-08-12) label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 25 FY26 Sprint 25 (2026-06-03 - 2026-06-17) FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) FY27 Sprint 1 FY27 Sprint 1 (2026-07-01 - 2026-07-15) FY27 Sprint 2 FY27 Sprint 2 (2026-07-15 - 2026-07-29) FY27 Sprint 3 FY27 Sprint 3 (2026-07-29 - 2026-08-12) Size: 3 A percentage of a sprint. 2.1 hours. Status: Merge Conflicts Merge conflicts must be resolved. Type: Bug - Blocker Bug is blocking user work, no workaround available

Projects

Status: Ready for QA ⏩

Development

Successfully merging this pull request may close these issues.

5 participants