Skip to content

Commit

Permalink
Allow forcing of auth to a specific user, for debugging only!
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2010
1 parent 2cfbd1e commit 0c4288d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .hgignore
@@ -1,2 +1,2 @@
syntax:glob
dbpass.php
localcfg.php
2 changes: 1 addition & 1 deletion .htaccess
Expand Up @@ -26,7 +26,7 @@
deny from all
</Files>

<Files dbpass.php>
<Files localcfg.php>
order allow,deny
deny from all
</Files>
Expand Down
9 changes: 9 additions & 0 deletions auth.php
Expand Up @@ -3,6 +3,8 @@
header("HTTP/1.0 307 Temporary redirect");
header('Content-type: text/plain; charset=UTF-8');

require_once('localcfg.php');

session_start();

if (isset($_GET['logout']))
Expand All @@ -16,6 +18,13 @@
exit(0);
} // if

// This is set in localcfg.php.
if ($GAllowForceAuth)
{
if (isset($_GET['force']))
$_SESSION['steamid'] = $_GET['force'];
} //if

if (isset($_SESSION['steamid']))
{
// Already logged in.
Expand Down
2 changes: 1 addition & 1 deletion database.php
Expand Up @@ -3,7 +3,7 @@
// This file adds a little bit of a wrapper over MySQL, and a little
// bit of convenience functionality.

require_once 'dbpass.php';
require_once 'localcfg.php';

$GDebugSQL = false;
$GDebugSQLErrors = true;
Expand Down

0 comments on commit 0c4288d

Please sign in to comment.