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

Public database password and username #54

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Public database password and username #54

GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Sensitive information such as database username and password should not be 
visible in public repositories. These information should be stored in a 
configuration file and this file should be excluded from commit.  

What steps will reproduce the problem?
1. Checkout the repository with this command:
   hg clone https://code.google.com/p/mass-observation/

2. Almost evey java file in the directory 
mass-observation/mob-web/src/java/newpackage contains the database username and 
password. Open Login.java as an example. You see the following lines:
   String dbUrl = "jdbc:mysql://titan.cmpe.boun.edu.tr:3306/database3";
   String username = "project3";
   String password = "i52jm";

3. Learn IP address of the server with this command:
   host titan.cmpe.boun.edu.tr

4. Connect to the database remotely using the following command and entering 
the password above:
   mysql -u project3 -h 79.123.177.214 -p

5. Now you have full control over the database. For example; you can see all 
registered users using the following commands:
   USE database3;
   SELECT * FROM users;

What is the expected output? What do you see instead?
Database username and password should not be in the public source code.  

What version of the product are you using? On what operating system?
Ubuntu 12.04 LTS

Please provide any additional information below.
To use hg command, you should first install it using the following command:
   sudo apt-get install mercurial

Original issue reported on code.google.com by erdemorm...@gmail.com on 17 May 2012 at 2:01

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

1 participant