Skip to content

Accept webhook URLs pasted twice or wrapped in quotes - #1

Merged
0xSacul merged 1 commit into
mainfrom
fix/webhook-paste
Nov 12, 2026
Merged

0xSacul merged 1 commit into
mainfrom
fix/webhook-paste

Conversation

@0xSacul

@0xSacul 0xSacul commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

The setup input field reads the clipboard on Ctrl+V by itself. In a terminal that also pastes the text and forwards the key, the URL ends up in the masked field twice ("...TOKENhttps://discord.com/..."), which failed validation with "that does not look like a Discord webhook URL" even though the copied URL was valid. Reported by a customer; reproduced by feeding the field a paste plus Ctrl+V (168 characters for an 84-character URL).

NormalizeWebhookURL now extracts the webhook from pasted text: the same URL repeated, surrounding whitespace, quotes, and angle brackets are accepted; two different URLs, a thread_id query, or other extra text are rejected with a specific message. Setup confirms the URL it understood in masked form and notes when it was pasted more than once. The scripted --webhook-url-stdin path uses the same normalization.

The setup input field reads the clipboard on Ctrl+V by itself. In a
terminal that also pastes the text and forwards the key, the URL ends up
in the masked field twice ("...TOKENhttps://discord.com/..."), which failed
validation with "that does not look like a Discord webhook URL" even
though the copied URL was valid. Reported by a customer; reproduced by
feeding the field a paste plus Ctrl+V (168 characters for an 84-character
URL).

NormalizeWebhookURL now extracts the webhook from pasted text: the same
URL repeated, surrounding whitespace, quotes, and angle brackets are
accepted; two different URLs, a thread_id query, or other extra text are
rejected with a specific message. Setup confirms the URL it understood in
masked form and notes when it was pasted more than once. The scripted
--webhook-url-stdin path uses the same normalization.
@0xSacul
0xSacul merged commit 03a89ef into main Nov 12, 2026
3 checks passed
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.

1 participant