Skip to content

Commit 73c2f75

Browse files
tadasantclaude
andcommitted
fix: maintain localhost validation for remote transport URLs
Ensure that template variable validation doesn't bypass the existing IsValidRemoteURL check that prevents localhost URLs in remote transports. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 1555c99 commit 73c2f75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/validators/validators.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,11 @@ func validateRemoteTransport(obj *model.Transport) error {
360360
}
361361
return fmt.Errorf("%w: %s", ErrInvalidRemoteURL, obj.URL)
362362
}
363+
364+
// Additional check: reject localhost URLs for remotes (like the old IsValidRemoteURL did)
365+
if !IsValidRemoteURL(obj.URL) {
366+
return fmt.Errorf("%w: %s", ErrInvalidRemoteURL, obj.URL)
367+
}
363368
return nil
364369
default:
365370
return fmt.Errorf("unsupported transport type for remotes: %s (only streamable-http and sse are supported)", obj.Type)

0 commit comments

Comments
 (0)