Repository navigation
Fixes #39817 - Respect configured smart proxy names as Sinatra permitted_hosts - #960
Merged
adamruzicka merged 1 commit intoOct 2, 2026
Merged
Conversation
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
September 30, 2026 09:45
026baa4 to
6d5dced
Compare
2 tasks
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
September 30, 2026 13:04
6d5dced to
495cfa3
Compare
adamruzicka
reviewed
Oct 1, 2026
adamruzicka
left a comment
Contributor
There was a problem hiding this comment.
Seems to work well, two comments inline.
| # before LoggerMiddleware. Use the proxy logger for rejected-host diagnostics. | ||
| ::Sinatra::Base.set :host_authorization, { | ||
| permitted_hosts: SETTINGS.permitted_hosts || [], | ||
| logger: ::Proxy::LogBuffer::Decorator.instance, |
Contributor
There was a problem hiding this comment.
The logging (especially without debug) is not all that great, but guess we can't do all that much about it.
2026-10-01T09:23:27 [D] Rack::Protection::HostAuthorization @all_permitted_hosts=["foo.baz.qux"] @permitted_hosts=["foo.baz.qux"] @domain_hosts=[] @ip_hosts=[] origin_host="foo.bar.baz" forwarded_host=nil
2026-10-01T09:23:27 [W] attack prevented by Rack::Protection::HostAuthorization
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
October 1, 2026 15:12
41dc227 to
5bdc2a2
Compare
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
October 1, 2026 15:19
5bdc2a2 to
2e8c8fc
Compare
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
October 2, 2026 09:20
2e8c8fc to
658fa17
Compare
…ted_hosts Warn when permitted hosts are not enforced by Sinatra
lhellebr
force-pushed
the
sat-49512-permitted-hosts
branch
from
October 2, 2026 09:34
658fa17 to
586dfcd
Compare
adamruzicka
approved these changes
Oct 2, 2026
Contributor
|
Thank you @lhellebr ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes 39817
Requires theforeman/foremanctl#900