PDA

View Full Version : Password protect database backup


roxics
07-28-2002, 09:54 AM
Can someone write a hack that will password protect the database backup. I'd hate to have anotehr admin backup the database on their machine and then buy a VB and have all my members and their posts to start with.

Granted I trust my admins but still. People can turn strange.

Admin
07-28-2002, 12:15 PM
Open /admin/backup.php, and ADD this code:
if ($HTTP_SERVER_VARS['PHP_AUTH_USER'] != 'username' or $HTTP_SERVER_VARS['PHP_AUTH_PW'] != 'password') {
header('WWW-Authenticate: Basic realm="vBulletin Protected Area"');
header('HTTP/1.0 401 Unauthorized');
}
Right after this:
if (function_exists("set_time_limit")==1 and get_cfg_var("safe_mode")==0) {
@set_time_limit(0);
}
Now change in the code you added the values of 'username' and 'password'. This is what you will use to login to that page.

(Note that if your other admins have access to the files (via FTP), this won't really help if they really want to steal your database.)

roxics
07-28-2002, 06:12 PM
Hey thanks a ton that will take that worry off my mind. Is there any way to also do that for 'Emailing all the members"? That way I don't have to worry about them using my board as a mailing list for their board.

Barto
01-29-2004, 09:38 PM
GReat !!!!!!!!