mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2016] Custom tool webhooks lost legacy local URL and response-size guards #988
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#988
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2016
Originally assigned to: @Xelvanis on GitHub.
Problem
Legacy custom-tool webhook execution used the shared safe fetch path:
packages/server/src/services/tools/tool-executor.tsreadsWEBHOOK_LOCAL_URLS_ENABLEDthroughisWebhookLocalUrlsEnabled().https:and rejects local/private resolved addresses.maxResponseBytes: 512 * 1024.The refactor custom-tool executor is less bounded:
src-tauri/src/commands/storage/custom_tools.rscallsis_allowed_outbound_url(url, true), which accepts localhttpandhttpsURLs unconditionally.response.text().awaitand returns the full text without the legacy success-body cap.This is a webhook contract and hostability drift: static/webhook custom tools are supported in refactor, but the webhook path no longer preserves the legacy local-URL opt-in or response-size guard.
Expected behavior
Either restore the legacy safety policy for custom-tool webhooks or document the intentional refactor divergence and add equivalent bounds for hostable/native execution.
Acceptance criteria
/api/invokeexecution follow the same policy.Context
Found during the Target 1 contracts-and-schemas batch-3 parityscan in #2011 while checking the positive static/webhook custom-tool contract. This is separate from the accepted script-tool divergence tracked in #1907.