Skip to content

out_opensearch: limit what a host placeholder can expand to - #192

Draft
kenhys wants to merge 1 commit into
mainfrom
fix-host
Draft

kenhys wants to merge 1 commit into
mainfrom
fix-host

Conversation

@kenhys

@kenhys kenhys commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Before: A placeholder in host/hosts was expanded and passed to the connection options as is. So a tag or a record field could add a host with ",", userinfo with "@" or a path with "/". The configured user, password and custom_headers were then sent to that host.

After: Each placeholder value is checked before the whole setting is expanded, so a value can only fill in a host name and a port. The rest of the setting, such as the "," between hosts or a scheme, userinfo and path the operator wrote, is left as it is. A placeholder used together with credentials logs a warning at startup.

Before: A placeholder in `host`/`hosts` was expanded and passed to the
connection options as is. So a tag or a record field could add a host
with ",", userinfo with "@" or a path with "/". The configured user,
password and custom_headers were then sent to that host.

After: Each placeholder value is checked before the whole setting is
expanded, so a value can only fill in a host name and a port. The rest
of the setting, such as the "," between hosts or a scheme, userinfo
and path the operator wrote, is left as it is. A placeholder used
together with credentials logs a warning at startup.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
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