Merge branch 'devel' to fix a couple of newly introduced bugs in 'common/' scripts

This commit is contained in:
Retro_Guy 2024-10-18 05:33:17 -07:00
commit 295fea8128
3 changed files with 5 additions and 57 deletions

View File

@ -3,12 +3,13 @@
/*
* CHANGE THE LINE BELOW TO 'installed = true once you have edited this filter
*/
$installed = false;
$installed = true;
// Set this to your administrative email address
$admin = "admin@example.com";
$admin = "admin@novabbs.com";
include "config.inc.php";
include "../spoolnews/newsportal.php";
$title .= " - Privacy and FAQ";
include "head.inc";

View File

@ -1,5 +1,6 @@
<?php
include "config.inc.php";
include "../spoolnews/newsportal.php";
include "alphabet.inc.php";
$title .= ' - Register';
@ -725,30 +726,6 @@ function create_new($username, $password, $user_email)
echo '<br /><a href="' . $CONFIG['default_content'] . '">Back</a>';
}
function get_user_config($username, $request)
{
global $config_dir;
$userconfigpath = $config_dir . "userconfig/";
$username = strtolower($username);
$userFilename = $userconfigpath . $username;
if ($userFileHandle = @fopen($userFilename, 'r')) {
while (!feof($userFileHandle)) {
$buffer = fgets($userFileHandle);
if (strpos($buffer, $request . ':') !== FALSE) {
$userdataline = $buffer;
fclose($userFileHandle);
$userdatafound = explode(':', $userdataline);
return trim($userdatafound[1]);
}
}
fclose($userFileHandle);
return FALSE;
} else {
return FALSE;
}
}
function make_key($username)
{
$key = openssl_random_pseudo_bytes(44);
@ -764,27 +741,6 @@ function create_code($username)
return $code;
}
function get_config_value($configfile, $request)
{
global $config_dir;
if ($configFileHandle = @fopen($config_dir . '/' . $configfile, 'r')) {
while (!feof($configFileHandle)) {
$buffer = fgets($configFileHandle);
if (strpos($buffer, $request . ':') !== FALSE) {
$dataline = $buffer;
fclose($configFileHandle);
$datafound = explode(':', $dataline);
return $datafound[1];
}
}
fclose($configFileHandle);
return FALSE;
} else {
return FALSE;
}
}
function generateImage($text, $file)
{
$im = @imagecreate(74, 25) or die("Cannot Initialize new GD image stream");
@ -826,13 +782,4 @@ function prepareCaptcha($captchaImage)
$usedAlphabet = rand(0, 9);
$code = $alphabet[$usedAlphabet] . $alphabetsForNumbers[$usedAlphabet][$expression->n1] . $alphabetsForNumbers[$usedAlphabet][$expression->n2];
return ($code);
}
function format_log_date()
{
return date('M d H:i:s');
}
function logging_prefix() {
return format_log_date() . " [" . $_SERVER['REMOTE_ADDR'] . "]";
}

View File

@ -1 +1 @@
0.9.160
0.9.161