mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 00:01:29 +02:00
Compare commits
13 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
81f67f3a6e | ||
|
4a185ed02e | ||
|
cfd0fe6943 | ||
|
6590827316 | ||
|
738dd786ba | ||
|
17f2d6e03a | ||
|
20c3371460 | ||
|
aa523eadf1 | ||
|
179dcd9642 | ||
|
8ebb64a92a | ||
|
e091adcc9c | ||
|
61a7e0fdfc | ||
|
ad794c17ed |
2
.github/setup-phpbb.sh
vendored
2
.github/setup-phpbb.sh
vendored
@@ -31,6 +31,6 @@ php ../composer.phar install --dev --no-interaction
|
||||
if [[ "$PHP_VERSION" =~ ^nightly$ || "$PHP_VERSION" =~ ^8 ]]
|
||||
then
|
||||
php ../composer.phar remove phpunit/dbunit --dev --update-with-dependencies \
|
||||
&& php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
&& php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
fi
|
||||
cd ..
|
||||
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -548,7 +548,7 @@ jobs:
|
||||
cd ${env:GITHUB_WORKSPACE}\phpBB
|
||||
php ..\composer.phar install
|
||||
php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies
|
||||
php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs
|
||||
cd ..
|
||||
- name: Setup database
|
||||
run: |
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.3.10-RC1" />
|
||||
<property name="newversion" value="3.3.10" />
|
||||
<property name="prevversion" value="3.3.9" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.5, 3.3.6, 3.3.7, 3.3.8, 3.3.10-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
@@ -31,6 +31,12 @@ $cron_type = $request->variable('cron_type', '');
|
||||
|
||||
$get_params_array = $request->get_super_global(\phpbb\request\request_interface::GET);
|
||||
|
||||
/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */
|
||||
$http_kernel = $phpbb_container->get('http_kernel');
|
||||
|
||||
/* @var $symfony_request \phpbb\symfony_request */
|
||||
$symfony_request = $phpbb_container->get('symfony_request');
|
||||
|
||||
/** @var \phpbb\controller\helper $controller_helper */
|
||||
$controller_helper = $phpbb_container->get('controller.helper');
|
||||
$cron_route = 'phpbb_cron_run';
|
||||
@@ -42,6 +48,8 @@ try
|
||||
Response::HTTP_MOVED_PERMANENTLY
|
||||
);
|
||||
$response->send();
|
||||
$http_kernel->terminate($symfony_request, $response);
|
||||
exit();
|
||||
}
|
||||
catch (RouteNotFoundException $exception)
|
||||
{
|
||||
@@ -68,3 +76,4 @@ $response = new Response(
|
||||
$error_code
|
||||
);
|
||||
$response->send();
|
||||
$http_kernel->terminate($symfony_request, $response);
|
||||
|
@@ -50,6 +50,7 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v3310rc1">Changes since 3.3.10-RC1</a></li>
|
||||
<li><a href="#v339">Changes since 3.3.9</a></li>
|
||||
<li><a href="#v339rc1">Changes since 3.3.9-RC1</a></li>
|
||||
<li><a href="#v338">Changes since 3.3.8</a></li>
|
||||
@@ -165,6 +166,13 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v3310rc1"></a><h3>Changes since 3.3.10-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17091">PHPBB3-17091</a>] - PHP 8.0 builds fail due to incompatible doctrine/instantiator</li>
|
||||
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17092">PHPBB3-17092</a>] - Check for error codes when querying Spamhaus</li>
|
||||
</ul>
|
||||
|
||||
<a name="v339"></a><h3>Changes since 3.3.9</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.3.10-RC1');
|
||||
@define('PHPBB_VERSION', '3.3.10');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli')
|
||||
define('IN_PHPBB', true);
|
||||
define('IN_INSTALL', true);
|
||||
define('PHPBB_ENVIRONMENT', 'production');
|
||||
define('PHPBB_VERSION', '3.3.10-RC1');
|
||||
define('PHPBB_VERSION', '3.3.10');
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
|
@@ -316,7 +316,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.10-RC1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.3.10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
|
||||
|
||||
|
@@ -738,6 +738,10 @@ $lang = array_merge($lang, array(
|
||||
'LOG_SEARCH_INDEX_CREATED' => '<strong>Created search index for</strong><br />» %s',
|
||||
'LOG_SEARCH_INDEX_REMOVED' => '<strong>Removed search index for</strong><br />» %s',
|
||||
'LOG_SPHINX_ERROR' => '<strong>Sphinx Error</strong><br />» %s',
|
||||
|
||||
'LOG_SPAMHAUS_OPEN_RESOLVER' => 'Spamhaus does not allow queries using an open resolver. Blacklist checking has been disabled. For more information, see https://www.spamhaus.com/product/help-for-spamhaus-public-mirror-users/.',
|
||||
'LOG_SPAMHAUS_VOLUME_LIMIT' => 'Spamhaus query volume limit has been exceeded. Blacklist checking has been disabled. For more information, see https://www.spamhaus.com/product/help-for-spamhaus-public-mirror-users/.',
|
||||
|
||||
'LOG_STYLE_ADD' => '<strong>Added new style</strong><br />» %s',
|
||||
'LOG_STYLE_DELETE' => '<strong>Deleted style</strong><br />» %s',
|
||||
'LOG_STYLE_EDIT_DETAILS' => '<strong>Edited style</strong><br />» %s',
|
||||
|
36
phpBB/phpbb/db/migration/data/v33x/v3310.php
Normal file
36
phpBB/phpbb/db/migration/data/v33x/v3310.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace phpbb\db\migration\data\v33x;
|
||||
|
||||
class v3310 extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return version_compare($this->config['version'], '3.3.10', '>=');
|
||||
}
|
||||
|
||||
public static function depends_on()
|
||||
{
|
||||
return [
|
||||
'\phpbb\db\migration\data\v33x\v3310rc1',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return [
|
||||
['config.update', ['version', '3.3.10']],
|
||||
];
|
||||
}
|
||||
}
|
@@ -420,7 +420,7 @@ class session
|
||||
// Else check the autologin length... and also removing those having autologin enabled but no longer allowed board-wide.
|
||||
if (!$this->data['session_autologin'])
|
||||
{
|
||||
if ($this->data['session_time'] < $this->time_now - ($config['session_length'] + 60))
|
||||
if ($this->data['session_time'] < $this->time_now - ((int) $config['session_length'] + 60))
|
||||
{
|
||||
$session_expired = true;
|
||||
}
|
||||
@@ -1346,6 +1346,109 @@ class session
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if ip is blacklisted by Spamhaus SBL
|
||||
*
|
||||
* Disables DNSBL setting if errors are returned by Spamhaus due to a policy violation.
|
||||
* https://www.spamhaus.com/product/help-for-spamhaus-public-mirror-users/
|
||||
*
|
||||
* @param string $dnsbl the blacklist to check against
|
||||
* @param string|false $ip the IPv4 address to check
|
||||
*
|
||||
* @return bool true if listed in spamhaus database, false if not
|
||||
*/
|
||||
function check_dnsbl_spamhaus($dnsbl, $ip = false)
|
||||
{
|
||||
global $config, $phpbb_log;
|
||||
|
||||
if ($ip === false)
|
||||
{
|
||||
$ip = $this->ip;
|
||||
}
|
||||
|
||||
// Spamhaus does not support IPv6 addresses.
|
||||
if (strpos($ip, ':') !== false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($ip)
|
||||
{
|
||||
$quads = explode('.', $ip);
|
||||
$reverse_ip = $quads[3] . '.' . $quads[2] . '.' . $quads[1] . '.' . $quads[0];
|
||||
|
||||
$records = dns_get_record($reverse_ip . '.' . $dnsbl . '.', DNS_A);
|
||||
if (empty($records))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error = false;
|
||||
foreach ($records as $record)
|
||||
{
|
||||
if ($record['ip'] == '127.255.255.254')
|
||||
{
|
||||
$error = 'LOG_SPAMHAUS_OPEN_RESOLVER';
|
||||
break;
|
||||
}
|
||||
else if ($record['ip'] == '127.255.255.255')
|
||||
{
|
||||
$error = 'LOG_SPAMHAUS_VOLUME_LIMIT';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($error !== false)
|
||||
{
|
||||
$config->set('check_dnsbl', 0);
|
||||
$phpbb_log->add('critical', $this->data['user_id'], $ip, $error);
|
||||
}
|
||||
else
|
||||
{
|
||||
// The existence of a non-error A record means it's a hit
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if an IPv4 address is in a specified DNS blacklist
|
||||
*
|
||||
* Only checks if a record is returned or not.
|
||||
*
|
||||
* @param string $dnsbl the blacklist to check against
|
||||
* @param string|false $ip the IPv4 address to check
|
||||
*
|
||||
* @return bool true if record is returned, false if not
|
||||
*/
|
||||
function check_dnsbl_ipv4_generic($dnsbl, $ip = false)
|
||||
{
|
||||
if ($ip === false)
|
||||
{
|
||||
$ip = $this->ip;
|
||||
}
|
||||
|
||||
// This function does not support IPv6 addresses.
|
||||
if (strpos($ip, ':') !== false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$quads = explode('.', $ip);
|
||||
$reverse_ip = $quads[3] . '.' . $quads[2] . '.' . $quads[1] . '.' . $quads[0];
|
||||
|
||||
if (checkdnsrr($reverse_ip . '.' . $dnsbl . '.', 'A') === true)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if ip is blacklisted
|
||||
* This should be called only where absolutely necessary
|
||||
@@ -1372,28 +1475,25 @@ class session
|
||||
}
|
||||
|
||||
$dnsbl_check = array(
|
||||
'sbl.spamhaus.org' => 'http://www.spamhaus.org/query/bl?ip=',
|
||||
'sbl.spamhaus.org' => ['http://www.spamhaus.org/query/bl?ip=', 'check_dnsbl_spamhaus'],
|
||||
);
|
||||
|
||||
if ($mode == 'register')
|
||||
{
|
||||
$dnsbl_check['bl.spamcop.net'] = 'http://spamcop.net/bl.shtml?';
|
||||
$dnsbl_check['bl.spamcop.net'] = ['http://spamcop.net/bl.shtml?', 'check_dnsbl_ipv4_generic'];
|
||||
}
|
||||
|
||||
if ($ip)
|
||||
{
|
||||
$quads = explode('.', $ip);
|
||||
$reverse_ip = $quads[3] . '.' . $quads[2] . '.' . $quads[1] . '.' . $quads[0];
|
||||
|
||||
// Need to be listed on all servers...
|
||||
$listed = true;
|
||||
$info = array();
|
||||
|
||||
foreach ($dnsbl_check as $dnsbl => $lookup)
|
||||
{
|
||||
if (checkdnsrr($reverse_ip . '.' . $dnsbl . '.', 'A') === true)
|
||||
if (call_user_func(array($this, $lookup[1]), $dnsbl, $ip) === true)
|
||||
{
|
||||
$info = array($dnsbl, $lookup . $ip);
|
||||
$info = array($dnsbl, $lookup[0] . $ip);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user