Always Use LHOST for Full URL in HTTP/S Stage

Redmine #8726 documents a change where the reverse HTTP/S
tries to bind LHOST and if it can not it does a hard stop

If it's expected that users will use ReverseListenerBind-
-Address then this commit addresses #8726 by patching the
HTTP/S stage with the host provided by the user in LHOST.

Currently ReverseListenerBindAddress (if used) is patched
into the stage. This makes for a broken HTTP/S session if
the user sets this option to 0.0.0.0.

With this commit--users can provide any LHOST they like
and set ReverseListenerBindAddress to 0.0.0.0 and things
will work.

This commit does not attempt to bring the HTTP/S handler
back to the old behavior of falling back to 0.0.0.0 when
it can't bind LHOST. I'd welcome the old behavior but I
leave it to you to decide what makes sense. :)
bug/bundler_fix
Raphael Mudge 2014-01-04 15:16:22 -05:00
parent 165728cd40
commit f93210ca74
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ module ReverseHttp
addrs = bind_address
local_port = bind_port
scheme = (ssl?) ? "https" : "http"
"#{scheme}://#{addrs[0]}:#{local_port}/"
"#{scheme}://#{datastore['LHOST']}:#{local_port}/"
end
#