Skip to content

#2089 Send http.basicauth credentials only to the hosts in http.basicauth.hosts - #2163

Open
rzo1 wants to merge 1 commit into
apache:mainfrom
rzo1:2089-scope-basicauth-to-hosts
Open

rzo1 wants to merge 1 commit into
apache:mainfrom
rzo1:2089-scope-basicauth-to-hosts

Conversation

@rzo1

@rzo1 rzo1 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Part of #2089. Scoping credential headers in http.custom.headers is tracked in #2162.

Adds http.basicauth.hosts. The basic auth header is sent only to listed hosts (page fetches and robots.txt); credential headers in http.custom.headers now log a WARN.

Release note (breaking): http.basicauth.user without http.basicauth.hosts no longer sends credentials; a WARN is logged at startup.

…in the new http.basicauth.hosts key and warn about credential headers in http.custom.headers.

@dpol1 dpol1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one question inline

|| !parsed.equals(
new HttpUrl.Builder().scheme("http").host(parsed.host()).build())) {
LOG.warn(
"Ignoring '{}' in http.basicauth.hosts, expected a host name or IP address "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we not log the value here? a pasted URL with user:pw in it would end up in the logs, like the proxy string in #2151

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.

2 participants