Where can I keep a database?

How do you keep GitHub users from attacking your database?

  • Lets say I post a project on GitHub that uses a database. As usual you have the login and password in the code to access the database. I assume you set up a special testing database for your GitHub code, with the actions limited to more harmless commands. But what if you need code that involves more dangerous commands, like DELETE?

  • Answer:

    "As usual you have the login and password in the code to access the database." No you don't. Never do that. Either put them in environment variables, or in a configuration file that doesn't get checked into version control. Sorry if that sounds a bit harsh, but it will save you a world of trouble someday if you get in the habit of doing that now.

Phil Darnowsky at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.