Move auth logging in post.php to auth.log.

This commit is contained in:
Retro_Guy 2024-07-17 08:27:49 -07:00
parent f0fab10597
commit d59c8ea313
3 changed files with 5 additions and 4 deletions

View File

@ -45,6 +45,7 @@ if ($free_spool_disk_space < $min_spool_disk_space) {
$logdir = $spooldir . '/log';
$debug_log = $logdir . '/debug.log';
$abuse_log = $logdir . '/abuse.log';
$auth_log = $logdir . '/auth.log';
$lockdir = $spooldir . '/lock';
$ssldir = $spooldir . '/ssl/';
$user_ban_file = $config_dir . '/banned_names.conf';

View File

@ -1302,9 +1302,9 @@ function set_user_logged_in_cookies($name, $keys) {
function check_bbs_auth($username, $password)
{
global $config_dir, $spooldir, $CONFIG;
global $config_dir, $spooldir, $CONFIG, $auth_log;
$logfile = $spooldir . '/log/auth.log';
$logfile = $auth_log;
if ($username == '' && $password == '') {
return false;
}

View File

@ -496,10 +496,10 @@ if ($show == 1) {
echo 'value="' . htmlspecialchars($name) . '"';
if ($logged_in && isset($name)) {
echo 'size="40" maxlength="40" readonly>';
file_put_contents($debug_log, "\n" . format_log_date() . " DEBUG post.php AUTH SET for: " . $name, FILE_APPEND);
file_put_contents($auth_log, "\n" . format_log_date() . " AUTH SET for: " . $name, FILE_APPEND);
} else {
echo 'size="40" maxlength="40">';
file_put_contents($debug_log, "\n" . format_log_date() . " DEBUG post.php AUTH NOT SET for: " . $name, FILE_APPEND);
file_put_contents($auth_log, "\n" . format_log_date() . " AUTH NOT SET for: " . $name, FILE_APPEND);
}
if ($CONFIG['anonuser'])
echo '&nbsp;or "' . $CONFIG['anonusername'] . '" with no password';