Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a message with the IP web-console is seeing #171

Merged
merged 1 commit into from
Oct 28, 2015

Conversation

gsamokovarov
Copy link
Collaborator

This is one part of the problem reported at #164. However, it doesn't fix the issue, though. 馃槥 It just gives the users better idea of what address web-console is actually seeing.

This is happening for developers running web-console in a virtual machine or a container with a Rails app behind an nginx or Apache proxy.

EDIT:

Actually @matthewd is correct (as always 馃槉). The problem @brunze was getting was because in the docker setup, we are getting through two networks, so can't trust one and not the other, we have to trust both, to be sure that we can execute arbitrary code in there. Hopefully, with the proper display of the IP, folks will get hinted about this. I'll also try to document it for the next release.

@@ -5,8 +5,8 @@ module WebConsole
# return false, an info log message will be displayed in users' logs.
class WhinyRequest < SimpleDelegator
def from_whitelisted_ip?
whine_unless request.from_whitelisted_ip? do
"Cannot render console from #{request.remote_ip}! " \
whine_unless request.from_whitelited_ip? do
Copy link
Member

Choose a reason for hiding this comment

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

The correctly-spelled name is the right one since #170... which means this should probably be causing a test failure somewhere? 馃槙

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right, I have messed it up during a rebase. Should be fixed now.

@matthewd
Copy link
Member

This is the correct fix; there is no other issue, as far as I can see.

gsamokovarov added a commit that referenced this pull request Oct 28, 2015
Display a message with the IP web-console is seeing
@gsamokovarov gsamokovarov merged commit e7dcc5f into rails:master Oct 28, 2015
@pdipietro
Copy link

Which is the correct gem to download to get this fix?

I have web-console (2.2.1) !!!

@gsamokovarov gsamokovarov deleted the strict-ip-logging branch December 13, 2015 16:47
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.

None yet

3 participants