More working on standardizing 'logged_in' status.
This commit is contained in:
parent
228908ac09
commit
03c2b22cd1
@ -1883,6 +1883,12 @@ table.overboard_results_table {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.upload_logged_in_msg {
|
||||
color: var(--color-text);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.user_table_login {
|
||||
border: 0;
|
||||
align-items: center;
|
||||
|
@ -1345,16 +1345,14 @@ function group_display_name($gname)
|
||||
|
||||
function verify_logged_in($name)
|
||||
{
|
||||
global $CONFIG, $auth_log, $debug_log;
|
||||
global $CONFIG, $spooldir, $auth_log, $debug_log;
|
||||
|
||||
$keyfile = $spooldir . '/keys.dat';
|
||||
$keys = unserialize(file_get_contents($keyfile));
|
||||
|
||||
$logged_in = false;
|
||||
$ip_pass = false;
|
||||
|
||||
// /* This may cause issues if cookies or javascript disabled
|
||||
// if(!isset($_COOKIE['mail_name']) || trim($_COOKIE['mail_name'] == '')) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// For checking session expire stuff
|
||||
if (!isset($_SESSION['start_stamp'])) {
|
||||
$_SESSION['start_stamp'] = time();
|
||||
|
@ -74,15 +74,15 @@ if ($setcookies) {
|
||||
$name = $_COOKIE["mail_name"];
|
||||
}
|
||||
|
||||
// Truncate username at 30 characters to avoid abuse
|
||||
$name = substr($name, 0, 30);
|
||||
$name = sanitize_header($name);
|
||||
|
||||
$logged_in = false;
|
||||
if (trim($name) != '') {
|
||||
$logged_in = verify_logged_in(trim(strtolower($name)));
|
||||
}
|
||||
|
||||
// Truncate username at 30 characters to avoid abuse
|
||||
$name = substr($name, 0, 30);
|
||||
$name = sanitize_header($name);
|
||||
|
||||
// This will log user post info (group and username)
|
||||
$enable_post_log = false;
|
||||
if ($OVERRIDES['enable_post_log'] > 0) {
|
||||
|
@ -102,7 +102,7 @@ if (! $logged_in && ! check_bbs_auth($_POST['username'], $_POST['password'])) {
|
||||
echo '</form>';
|
||||
} else {
|
||||
echo '<form name="form1" method="post" action="upload.php" enctype="multipart/form-data">';
|
||||
echo '<tr><td><strong>Logged in as ' . $_POST['username'] . '<br >(max size=2MB)</strong></td></tr>';
|
||||
echo '<tr><td class="upload_logged_in_msg"><strong>Logged in as ' . $_POST['username'] . '<br >(max size=2MB)</strong></td></tr>';
|
||||
echo '<td><input name="command" type="hidden" id="command" value="Upload" readonly="readonly"></td>';
|
||||
echo '<input type="hidden" name="key" value="' . password_hash($CONFIG['thissitekey'] . $name, PASSWORD_DEFAULT) . '">';
|
||||
echo '<input type="hidden" name="username" value="' . $_POST['username'] . '">';
|
||||
|
Loading…
x
Reference in New Issue
Block a user