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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notice on server boot if binding to 0.0.0.0 #10755

Merged
merged 1 commit into from May 28, 2013

Conversation

lukewendling
Copy link
Contributor

My colleagues and I spend a lot of our dev time in coffee shops and on public wi-fi. Lightly call attention to a fairly obvious security hole per http://blog.codeclimate.com/blog/2013/03/27/rails-insecure-defaults/

@rafaelfranca
Copy link
Member

I'm not sure if someone will read this notice.

@steveklabnik
Copy link
Member

I would prefer to actually change it to 127.0.0.1 over printing this kind of warning.

@rafaelfranca
Copy link
Member

👍

But since this change the development workflow to something more difficult I like to hear @dhh and @jeremy before making any decision.

@steveklabnik
Copy link
Member

Absolutely, and @NZKoz would be good as well.

@pixeltrix
Copy link
Contributor

👍 to changing the default to 127.0.0.1

@ccallebs
Copy link
Contributor

👍 as well.

@NZKoz
Copy link
Member

NZKoz commented May 26, 2013

In terms of a message, I agree with @rafaelfranca, no one will see that.

Security wise I can understand the desire for the defaults, but if you're spending time in coffee shops and don't have your firewall enabled you have much bigger problems.

binding to 127.0.0.1 would make some workflows more annoying, though on the whole it would be easy enough to work around. You'd probably want to bind to ::1 for ipv6 nerds too, not sure if that will cause errors.

@egilburg
Copy link
Contributor

Most people who start a basic single instance mongrel, especially for the first time, will see the message, in my opinion. More advanced configurations such as running in the background may hide the message, but it's the basic users who would benefit most from the warning.

If you do switch to binding by default, there has to be a switch like --no-binding (or should it be --global-binding or --bind-all?) to turn if off for those who for whatever reason need the current behaviour. And a startup message should then explain it, probably.

@dhh
Copy link
Member

dhh commented May 27, 2013

I remember we tried this once many years ago and it was annoying for some reason. I don't remember what the problem was though.

I think a notice is a good place to start. It's highly visible when you start the webrick server as you will see the output straight in that terminal.

@rafaelfranca
Copy link
Member

Fine. Lets start with the notice.

rafaelfranca added a commit that referenced this pull request May 28, 2013
Add notice on server boot if binding to 0.0.0.0
@rafaelfranca rafaelfranca merged commit e102629 into rails:master May 28, 2013
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

8 participants