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

[SECURITY BUG] Class shown when a user enters the wrong password #26

Closed
envygeeks opened this issue Feb 4, 2012 · 4 comments
Closed

Comments

@envygeeks
Copy link

While configuring Pry for the pry developers today and doing some of the most basic security tests on our server I decided to see how well it could handle authentication and it's basic, I put in the wrong password and it showed me everything in the class it init. If somebody were to create a blank class and put the passwords hash in that class, it would render the entire point of auth moot.

jordon@envygeeks:~ % pry-remote-em pryem://pry01.envygeeks.com:1337
[pry-remote-em] client connected
[pry-remote-em] remote is PryRemoteEm 0.4.2 pryem
user: envygeeks
envygeeks's password: ****

Frame number: 0/0
From: /home/pry/.bin/pry_server @ line 16 in Foo#initialize:

    11: 
    12: require 'pry-remote-em/server'
    13: 
    14: class Foo
    15:   def initialize
 => 16:     binding.remote_pry_em('10.4.5.71', 1337, auth: $auth)
    17:   end
    18: end
    19: 
    20: EM.run do
    21:   Foo.new
@gruis
Copy link
Owner

gruis commented Feb 4, 2012

Yup, that's not good.

It only happens when you run it as binding.remote_pry_em ...., right?
If you start the server as some_object.remote_pry_em you won't get the dump with the password, correct?

Thanks for the report. I'll work on it today.

@envygeeks
Copy link
Author

I'll test it for you right now, or well I'll have @banister test it.

@gruis gruis closed this as completed in 94538d5 Feb 4, 2012
@gruis
Copy link
Owner

gruis commented Feb 4, 2012

That should fix it.

If course, in the scenario you describe, once a user successfully logs in they can get access to the auth data see other user/password combinations.

Perhaps a note in the readme about the security benefits of using an authenticator that is external to the process would be good.

@gruis
Copy link
Owner

gruis commented Feb 5, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants