Repository navigation
fix: encode the webhook GET payload as UTF-8 so non-ASCII arguments work - #12453
Merged
hugocasa merged 1 commit intoNov 16, 2026
Merged
Conversation
burrows99
requested review from
alpetric,
hugocasa and
rubenfiszel
as code owners
November 15, 2026 18:04
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this PR do?
On a script or flow's Webhooks panel, choosing a GET call (or Sync SSE with the token in the query) puts the arguments in the URL as
payload=<base64 JSON>. With any non-ASCII argument that URL does not work:Joségives a URL the server refuses: "Internal: Impossible to decode query payload: ... invalid unicode code point".Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 rangein the console, and the panel keeps showing the URL for the previous value.WebhooksConfigSection.sveltepassed the JSON string straight tobtoa, which only accepts Latin-1 characters and encodes each one as a single byte, while the server decodes the payload as UTF-8. This PR encodes the JSON as UTF-8 bytes beforebtoa: three changed lines plus a comment. ASCII arguments give exactly the same URL as before.Reproduced on
mainat 96c97b0 (CE v1.875.0).flowchart TD A[Argument with an accent or emoji] --> B{GET webhook URL} B -->|Before| C[Server cannot decode the payload] B -->|After| D[Script runs with the value as typed]Narrated recording, before then after (sound on):
evidence.mp4
The recording is the real app (frontend dev server from this checkout against the
mainbackend image). The URL shown in the panel is opened in a new tab of the same signed-in browser. Waits on page loads are shortened; nothing else is edited.Edge cases and unchanged behaviour checked
All checked in the running app, on this branch:
東京 🚀) run and come back as typed.a+b/c=d & e?(base64 and URL-special characters) comes back as typed.Ada) gives the samepayloadasmain(same bytes, same base64), and runs.Checks run
npm run lint(oxlint): passes.prettier --checkon the changed file: passes.npm run check(svelte-check needs about 8 GB here) andnpm run check:fast(no bun on this machine).Related issue
None filed. Found on the Webhooks panel of a script.
AI assistance (Claude Code) was used to find, fix and record this. I reproduced and verified it in the running app.
🤖 Generated with Claude Code
Summary by cubic
Fixes GET webhook URLs with non-ASCII arguments, which previously failed to decode on the server (e.g.
José) or threw abtoaerror in the console (Japanese text, emoji).The payload JSON is now encoded as UTF-8 bytes before
btoa, matching the server's UTF-8 decoding. ASCII arguments produce exactly the same URL as before.Written for commit 9b9e503. Summary will update on new commits.