1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-09-10 08:10:44 +02:00

Compare commits

...

106 Commits

Author SHA1 Message Date
Marc Alexander
81f67f3a6e [prep-release-3.3.1] Update changelog for 3.3.10 2023-02-04 20:32:52 +01:00
Marc Alexander
4a185ed02e [prep-release-3.3.1] Add migration for 3.3.10 2023-02-04 20:31:26 +01:00
Marc Alexander
cfd0fe6943 [prep-release-3.3.1] Update version numbers to 3.3.10 2023-02-04 20:31:19 +01:00
Marc Alexander
6590827316 Merge pull request #6453 from Noxwizard/ticket/17092
[ticket/17092] Check for Spamhaus error codes
2023-01-18 19:52:18 +01:00
Marc Alexander
738dd786ba [ticket/17092] Clean up docblock and remove redundant check
PHPBB3-17092
2023-01-17 20:44:05 +01:00
Patrick Webster
17f2d6e03a [ticket/17092] Check for Spamhaus error codes
Fix indentation

PHPBB3-17092
2023-01-17 20:37:49 +01:00
Patrick Webster
20c3371460 [ticket/17092] Check for Spamhaus error codes
Remove leftover logging

PHPBB3-17092
2023-01-17 20:37:49 +01:00
Patrick Webster
aa523eadf1 [ticket/17092] Check for Spamhaus error codes
Switches to using callbacks for each DNSBL so that special cases can be
handled when needed. Adds support for Spamhaus error codes and disables DNSBL
checking if errors are encountered since they probably won't be resolved in a
timely manner by the owner or host.

PHPBB3-17092
2023-01-17 20:37:48 +01:00
Marc Alexander
179dcd9642 Merge pull request #6452 from marc1706/ticket/17091
[ticket/17091] Limit doctrine/instantiator to 1.x versions
2023-01-17 20:35:30 +01:00
Marc Alexander
8ebb64a92a [ticket/17091] Ensure session length is int
PHPBB3-17091
2023-01-16 16:56:12 +01:00
Marc Alexander
e091adcc9c [ticket/17091] Add kernel terminate logic and exit to cron response handling
PHPBB3-17091
2023-01-16 16:56:11 +01:00
Marc Alexander
61a7e0fdfc [ticket/17091] Update windows build commands as well
PHPBB3-17091
2023-01-15 22:00:21 +01:00
Marc Alexander
ad794c17ed [ticket/17091] Limit doctrine/instantiator to 1.x versions
PHPBB3-17091
2023-01-15 21:36:53 +01:00
Marc Alexander
6d8468c91a [prep-release-3.3.10] Update changelog for 3.3.10-RC1 2023-01-13 21:12:01 +01:00
Marc Alexander
aff7fab65f [prep-release-3.3.10] Add migration for 3.3.10-RC1 2023-01-13 21:11:51 +01:00
Marc Alexander
be053c3381 [prep-release-3.3.10] Update version numbers to 3.3.10 2023-01-13 21:11:31 +01:00
Marc Alexander
e805a47a98 [prep-release-3.3.10] Update version numbers to 3.3.10-RC1 2023-01-13 21:11:14 +01:00
Marc Alexander
9feae900d3 Merge pull request #68 from phpbb/ticket/security/275
[ticket/security/275] Gracefully handle exceptions thrown by wrong cron route
2023-01-12 20:33:42 +01:00
Marc Alexander
34f23477ff [ticket/security/275] Use unicode quote types
SECURITY-275
2023-01-12 20:12:33 +01:00
Marc Alexander
e5f069b15b [ticket/security/275] Add language vars and proper error codes
SECURITY-275
2023-01-11 20:33:08 +01:00
Marc Alexander
fd550bc25a [ticket/security/275] Gracefully handle exceptions thrown by wrong cron route
SECURITY-275
2023-01-10 21:09:48 +01:00
Marc Alexander
378c63b002 Merge pull request #6436 from LukeWCS/ticket/17068
[ticket/17068] ALLOW_CDN_EXPLAIN: Refines and expands the description
2023-01-10 20:38:20 +01:00
Marc Alexander
51766ffaee [ticket/17068] Slight adjustment to grammar in line with previous text
PHPBB3-17068
2023-01-10 20:03:25 +01:00
Marc Alexander
83b53690b5 Merge pull request #6450 from marc1706/ticket/17071
[ticket/17071] Switch to jsdelivr CDN for twemoji emojis
2023-01-09 21:58:31 +01:00
Marc Alexander
191f38b9a0 Merge pull request #6449 from marc1706/ticket/17039
[ticket/17039] Use correct template var for group colour in ucp groups manage
2023-01-09 21:40:17 +01:00
Marc Alexander
96afebf969 Merge pull request #6448 from marc1706/ticket/16938
[ticket/16938] Replace invalid nowrap with white-space css
2023-01-09 21:39:22 +01:00
Marc Alexander
3ece314338 [ticket/17071] Switch to jsdelivr CDN for twemoji emojis
PHPBB3-17071
2023-01-09 21:25:46 +01:00
Marc Alexander
c62d9e4c05 Merge pull request #6446 from rubencm/ticket/17082
[ticket/17082] Remove ability to warn anonymous
2023-01-07 21:02:12 +01:00
Marc Alexander
34b56205a3 [ticket/17039] Use correct template var for group colour in ucp groups manage
PHPBB3-17039
2023-01-07 20:51:40 +01:00
Marc Alexander
a0477a10ce [ticket/16938] Replace invalid nowrap with white-space css
PHPBB3-16938
2023-01-07 15:44:29 +01:00
Marc Alexander
9e44ba096e Merge pull request #6445 from rubencm/ticket/17081
[ticket/17081] Fix accept attribute in upload input
2023-01-07 15:40:21 +01:00
Ruben Calvo
7d29f133e5 [ticket/17082] Remove ability to warn anonymous
PHPBB3-17082
2023-01-06 04:33:09 +01:00
Ruben Calvo
e535f8e054 [ticket/17081] Fix accept attribute in upload input
PHPBB3-17081
2023-01-06 04:29:32 +01:00
Marc Alexander
11e68e910b Merge pull request #6444 from iMattPro/ticket/17075
[ticket/17075] Add template events to ACP footers after $SCRIPT
2023-01-04 21:47:53 +01:00
Marc Alexander
02efbc251e Merge pull request #6443 from rubencm/ticket/17074
[ticket/17074] Don't allow to create two roles with the same name
2023-01-03 22:52:04 +01:00
Matt Friedman
7434783b07 [ticket/17075] Add template events to ACP footers after $SCRIPT
PHPBB3-17075
2023-01-03 08:24:07 -08:00
Ruben Calvo
d446030a9b [ticket/17074] Don't allow to create two roles with the same name
PHPBB3-17074
2023-01-03 01:46:56 +01:00
LukeWCS
d6e3dfff6d [ticket/17068] ALLOW_CDN_EXPLAIN: Refines and expands the description
Concerns the description of the switch "APC > GENERAL > Load settings > Allow
usage of third party content delivery networks:".

* The text gives the impression that the choice of the switch state is a
personal preference of individual administrators. In fact, this is a matter of
local privacy laws.
* Missing mention that the switch also controls the integration of Font
Awesome, part of phpBB's GUI and extensions.

PHPBB3-17068
2022-12-26 11:07:42 +01:00
Marc Alexander
369ee44b6f Merge pull request #6423 from marc1706/ticket/13291
[ticket/13291] Close notifications dropdown during mark all read
2022-12-12 19:42:22 +01:00
Marc Alexander
0543c810a7 Merge pull request #6433 from marc1706/ticket/17066
[ticket/17066] Update actions to resolve deprecation warnings
2022-12-11 22:13:00 +01:00
Marc Alexander
bb0f6d040c [ticket/17066] Use Ubuntu 20.04 instead of 18.04
PHPBB3-17066
2022-12-11 20:43:01 +01:00
Marc Alexander
02ef7c5da4 [ticket/17066] Use new way of saving to github output
PHPBB3-17066
2022-12-11 16:54:37 +01:00
Marc Alexander
90899a17dd [ticket/17066] Use version 3 of actions checkout and cache
PHPBB3-17066
2022-12-11 15:10:44 +01:00
Marc Alexander
9c70c15e1c Merge pull request #6432 from Crizz0/ticket/17065
[ticket/17065] Add utf8_encode_ucr to $usernotes
2022-12-11 14:16:42 +01:00
Marc Alexander
21374390ad Merge pull request #6428 from wordlesswind/ticket/16105
[ticket/16105] Use Google reCAPTCHA globally
2022-12-09 21:43:06 +01:00
Marc Alexander
d03a853f6e Merge branch 'prep-release-3.3.9' into 3.3.x 2022-11-28 20:40:46 +01:00
Christian Schnegelberger
014008fd48 [ticket/17065] Add utf8_encode_ucr to $usernotes
PHPBB3-17065
2022-11-28 18:24:59 +01:00
Marc Alexander
b3d593b626 [prep-release-3.3.9] Update changelog for 3.3.9 2022-11-23 20:54:42 +01:00
Marc Alexander
744009882b [prep-release-3.3.9] Add migration for 3.3.9 2022-11-23 20:53:56 +01:00
Marc Alexander
1c407e8049 [prep-release-3.3.9] Update version numbers to 3.3.9 2022-11-23 20:53:53 +01:00
Marc Alexander
e75ea6642d Merge pull request #67 from phpbb/ticket/security-274
[ticket/security/274] Reset login keys/session when resetting password
2022-11-22 21:21:24 +01:00
Marc Alexander
ad9e5e6891 [ticket/16105] Replace const with lowercase version
PHPBB3-16105
2022-11-21 17:24:11 +01:00
Marc Alexander
b828efa9e6 [ticket/16105] Use domain setting for recaptcha v2 as well
PHPBB3-16105
2022-11-21 17:24:11 +01:00
Marc Alexander
c66923bafc [ticket/16105] Add domain selection to recaptcha v2 & check against list
PHPBB3-16105
2022-11-21 17:24:10 +01:00
wordlesswind
ebc5e1ead0 [ticket/16105] Use Google reCAPTCHA globally
PHPBB3-16105
2022-11-21 17:23:39 +01:00
Marc Alexander
c2968212d8 Merge branch 'prep-release-3.3.9' into 3.3.x 2022-11-14 20:07:55 +01:00
Marc Alexander
0793126dc4 Merge pull request #6426 from Crizz0/ticket/17058
[ticket/17058] Add if-sentence for $encode_eol for email headers
2022-11-14 20:07:27 +01:00
Christian Schnegelberger
9fb2dbb776 [ticket/17058] Add $encode_eol to process()
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Christian Schnegelberger
6f034c5215 [ticket/17058] Replace hardcoded PHP_EOL in phpbb_mail() with var
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Christian Schnegelberger
0802772f09 [ticket/17058] Add if-sentence for $encode_eol for email headers
PHPBB3-17058
2022-11-11 23:15:09 +01:00
Marc Alexander
696ff06263 Merge pull request #6425 from SagePtr/ticket/17056
[ticket/17056] Fix PHP 8.2 deprecation warning about ${var} syntax
2022-11-03 20:06:12 +01:00
SagePtr
b86d15a766 [ticket/17056] Fix PHP 8.2 deprecation warning about ${var} syntax
The "${var}" style of string interpolation is deprecated in PHP 8.2,
using "{$var}" syntax instead.

PHPBB3-17056
2022-11-02 00:30:46 +02:00
Marc Alexander
637844f264 [ticket/13291] Close notifications dropdown during mark all read
PHPBB3-13291
2022-10-27 00:01:36 +02:00
Marc Alexander
c410829a42 [3.3.x] Update versions to 3.3.10-dev 2022-10-26 22:44:56 +02:00
Marc Alexander
8ef6a5c1bc Merge branch 'prep-release-3.3.9' into 3.3.x 2022-10-26 22:43:17 +02:00
Marc Alexander
cd36a68645 [prep-release-3.3.9] Update changelog for 3.3.9-RC1 2022-10-22 20:56:04 +02:00
Marc Alexander
5225ac8a9a [prep-release-3.3.9] Add migration for 3.3.9-RC1 2022-10-22 20:55:14 +02:00
Marc Alexander
aaaef71b60 [prep-release-3.3.9] Update version numbers to 3.3.9 2022-10-22 20:55:12 +02:00
Marc Alexander
1fe8bbf47a [prep-release-3.3.9] Update version numbers to 3.3.9-RC1 2022-10-22 20:55:12 +02:00
Marc Alexander
827c135cc9 [ticket/security/274] Reset login keys/session when resetting password
SECURITY-274
2022-10-22 15:12:28 +02:00
Marc Alexander
67c41633a2 Merge pull request #6422 from marc1706/ticket/17050
[ticket/17050] Remove trailing slash from generated css includes
2022-10-22 11:34:54 +02:00
Marc Alexander
92cebdd624 Merge pull request #6421 from marc1706/ticket/17051
[ticket/17051] Fallback to default values for possible undefined user data
2022-10-22 11:21:46 +02:00
Marc Alexander
7017c73156 [ticket/17050] Remove trailing slash from generated css includes
PHPBB3-17050
2022-10-21 21:40:44 +02:00
Marc Alexander
2e025be53a [ticket/17051] Fallback to default values for possible undefined user data
PHPBB3-17051
2022-10-21 20:18:32 +02:00
Marc Alexander
2126738598 Merge pull request #6418 from marc1706/ticket/17048
[ticket/17048] Update composer dependencies for 3.3.9
2022-10-20 17:17:26 +02:00
Marc Alexander
99286b1fdd [ticket/17048] Update composer dependencies for 3.3.9
PHPBB3-17048
2022-10-15 23:29:12 +02:00
Marc Alexander
64717d0270 Merge pull request #6414 from imhunterand/patch-1
[ticket/17036] Fix failure to strip Authorization header on HTTP downgrade
2022-09-30 20:07:43 +02:00
ANDRI H.U
f197662653 [ticket/17036] Update guzzle and it's dependencies to latest version
PHPBB3-17036
2022-09-25 22:00:49 +02:00
Marc Alexander
e080a8533d Merge pull request #6415 from marc1706/ticket/17032
[ticket/17032] Prevent endlessly cycling to load user
2022-09-09 07:12:45 +02:00
Marc Alexander
f84e03f646 [ticket/17032] Prevent endlessly cycling to load user
PHPBB3-17032
2022-09-08 22:18:13 +02:00
Marc Alexander
7c02b58114 Merge pull request #6413 from rubencm/ticket/17030
[ticket/17030] Fix feed to return valid RFC-3339 dates
2022-08-26 21:46:53 +02:00
Marc Alexander
12256eabb6 Merge pull request #6412 from DaRk1V0iD/ticket/17026
[ticket/17026] Session viewonline not defined in Memberlist
2022-08-26 20:47:07 +02:00
Dark❶
9b1bae858f [ticket/17026] Session viewonline not defined in Memberlist
PHPBB3-17026
2022-08-26 10:55:20 +05:30
Ruben Calvo
db3c143b73 [ticket/17030] Fix feed to return valid RFC-3339 dates
PHPBB3-17030
2022-08-21 21:56:11 +02:00
Dark❶
ea19638f4e [ticket/17026] Session viewonline not defined in Memberlist
PHPBB3-17026
2022-08-12 20:40:52 +05:30
Marc Alexander
89b07af756 Merge pull request #6406 from Noxwizard/ticket/17003
[ticket/17003] Include topic icon on UCP front page
2022-07-28 20:11:19 +02:00
Marc Alexander
7275f9e7f1 [ticket/17003] Small code style adjustmens
PHPBB3-17003
2022-07-27 18:17:46 +02:00
Marc Alexander
8fbbaf97ab Merge pull request #6408 from Crizz0/ticket/17023
[ticket/17023] Adds PHP >=8.0  to composer require php version
2022-07-23 16:41:24 -04:00
Marc Alexander
b8a3d8f25d [ticket/17023] Update composer.lock as well
PHPBB3-17023
2022-07-22 20:16:11 -05:00
Christian Schnegelberger
495986ff5d [ticket/17023] Adds PHP >=8.0 to composer require php version
PHPBB3-17023
2022-07-19 17:47:53 +02:00
Marc Alexander
3ed3abb446 Merge pull request #6407 from Noxwizard/ticket/16917
[ticket/16917] Update phpbbcli.php's permissions in release archive
2022-07-16 19:02:52 -04:00
Marc Alexander
ca8c402796 Merge pull request #6405 from Noxwizard/ticket/16916
[ticket/16916] Include PHP version number in startup/install error
2022-07-16 18:47:56 -04:00
Marc Alexander
fafe250b0d Merge pull request #6404 from marc1706/ticket/17019
[ticket/17019] Treat removed youtube profile field as effectively installed
2022-07-16 18:44:56 -04:00
Marc Alexander
256ea96cd9 Merge pull request #6403 from marc1706/ticket/17006
[ticket/17006] Remove www. from server domain name example
2022-07-16 18:43:30 -04:00
Marc Alexander
5cdd22e058 Merge pull request #6402 from marc1706/ticket/16932
[ticket/16932] Ensure special characters are encoded for ASCII in emails
2022-07-16 18:39:02 -04:00
Patrick Webster
47e30a2e21 [ticket/16917] Update phpbbcli.php's permissions in release archive
For those employing cron on *nix, these will be the expected permissions.

PHPBB3-16917
2022-07-09 15:46:31 -05:00
Patrick Webster
040c2e9b78 [ticket/17003] Include topic icon on UCP front page
Prosilver already supports rendering topic icons on this view, but the backend
didn't populate the needed topicrow values.

PHPBB3-17003
2022-07-09 14:57:01 -05:00
Patrick Webster
2c661205e4 [ticket/16916] Include PHP version number in startup/install error
If the PHP version is too low, an error is displayed. This error does not
include the current PHP version number, which often becomes a debate with
users who believe they are running a supported version.

PHPBB3-16916
2022-07-04 21:12:43 -05:00
Marc Alexander
b5d2ff4074 [ticket/17019] Treat removed youtube profile field as effectively installed
PHPBB3-17019
2022-06-30 21:35:50 +02:00
Marc Alexander
b3d93a09f2 [ticket/17006] Remove www. from server domain name example
PHPBB3-17006
2022-06-28 21:49:01 +02:00
Marc Alexander
2f72950d2d Merge pull request #6401 from marc1706/ticket/17005
[ticket/17005] Add missing slash to li closing tag
2022-06-28 21:42:58 +02:00
Marc Alexander
064a96ec07 [ticket/16932] Ensure special characters are encoded for ASCII in emails
PHPBB3-16932
2022-06-27 22:36:25 +02:00
Marc Alexander
a8feaeafe8 [ticket/17005] Add missing slash to li closing tag
PHPBB3-17005
2022-06-27 21:00:58 +02:00
Marc Alexander
fc83f213d5 Merge branch 'prep-release-3.3.8' into 3.3.x 2022-06-26 20:28:13 +02:00
Marc Alexander
f930f8821f [3.3.x] Update versions to 3.3.9-dev 2022-06-06 22:54:43 +02:00
Marc Alexander
b84b875cd2 Merge branch 'prep-release-3.3.8' into 3.3.x 2022-06-06 22:53:26 +02:00
58 changed files with 758 additions and 188 deletions

View File

@@ -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 ..

View File

@@ -17,7 +17,7 @@ on:
jobs:
# Basic checks, e.g. parse errors, commit messages, etc.
basic-checks:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 100
@@ -46,12 +46,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -88,7 +88,7 @@ jobs:
# Tests for MySQL and MariaDB
mysql-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
@@ -157,14 +157,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -179,12 +179,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -229,7 +229,7 @@ jobs:
# Tests for PostgreSQL
postgres-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
@@ -290,14 +290,14 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
MATRIX_DB: ${{ matrix.db }}
run: |
db=$(echo "${MATRIX_DB%%:*}")
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -312,12 +312,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -345,7 +345,7 @@ jobs:
# Other database types, namely sqlite3 and mssql
other-tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
include:
@@ -388,7 +388,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- id: database-type
env:
@@ -400,7 +400,7 @@ jobs:
else
db=$(echo "${MATRIX_DB%%:*}")
fi
echo "::set-output name=db::$db"
echo "db=$db" >> $GITHUB_OUTPUT
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -415,12 +415,12 @@ jobs:
PHP_VERSION: ${{ matrix.php }}
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "::set-output name=version::${PHP_VERSION%.*}"
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "version=${PHP_VERSION%.*}" >> $GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -485,7 +485,7 @@ jobs:
git config --system core.autocrlf false
git config --system core.eol lf
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -499,13 +499,13 @@ jobs:
id: composer-cache
run: |
cd phpBB
echo "::set-output name=dir::$(composer config cache-files-dir)"
echo "dir=$(composer config cache-files-dir)" >> $env:GITHUB_OUTPUT
$major_version="${{ matrix.php }}".substring(0,1)
echo "::set-output name=version::$major_version"
echo "version=$major_version" >> $env:GITHUB_OUTPUT
cd ..
- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ steps.composer-cache.outputs.version }}-${{ hashFiles('phpBB/composer.lock') }}
@@ -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: |

View File

@@ -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.8" />
<property name="prevversion" value="3.3.7" />
<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.8-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, 3.3.10-RC1" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -362,6 +362,8 @@
<chmod mode="0777" file="${dir}/store" />
<chmod mode="0777" file="${dir}/files" />
<chmod mode="0777" file="${dir}/images/avatars/upload" />
<!-- set permissions of executable scripts to 755 -->
<chmod mode="0755" file="${dir}/bin/phpbbcli.php" />
</target>
<target name="clean-vendor-dir">

View File

@@ -14,7 +14,7 @@
<!-- BEGIN warn -->
<tr>
<td>{warn.USERNAME}</td>
<td style="text-align: center; nowrap: nowrap;">{warn.DATE}</td>
<td style="text-align: center; white-space: nowrap;">{warn.DATE}</td>
<td>{warn.ACTION}</td>
<td style="text-align: center;"><input type="checkbox" class="radio" name="mark[]" value="{warn.ID}" /></td>
</tr>

View File

@@ -21,6 +21,20 @@
<dd><input id="recaptcha_privkey" name="recaptcha_privkey" value="{RECAPTCHA_PRIVKEY}" size="50" type="text" /></dd>
</dl>
<dl>
<dt>
<label>{{ lang('RECAPTCHA_V3_DOMAIN') ~ lang('COLON') }}</label>
<br><span>{{ lang('RECAPTCHA_V3_DOMAIN_EXPLAIN') }}</span>
</dt>
<dd>
{% for domain in RECAPTCHA_V2_DOMAINS %}
<label>
<input class="radio" name="recaptcha_v2_domain" type="radio" value="{{ domain }}"{{ domain == RECAPTCHA_V2_DOMAIN ? ' checked' }}>
<span>{{ domain }}</span>
</label>
{% endfor %}
</dd>
</dl>
</fieldset>
<fieldset>

View File

@@ -42,5 +42,7 @@
<!-- EVENT acp_overall_footer_after -->
{$SCRIPTS}
{% EVENT acp_overall_footer_body_after %}
</body>
</html>

View File

@@ -23,5 +23,7 @@
<!-- EVENT acp_simple_footer_after -->
{$SCRIPTS}
{% EVENT acp_simple_footer_body_after %}
</body>
</html>

View File

@@ -26,7 +26,7 @@
"phpbb/phpbb-core": "self.version"
},
"require": {
"php": "^7.1.3",
"php": "^7.1.3 || ^8.0.0",
"ext-json": "*",
"ext-mbstring": "*",
"bantu/ini-get-wrapper": "~1.0",

143
phpBB/composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "1b58e9d5054a0881d4c29cb2e9523908",
"content-hash": "0201f3008dec8046725fd5e9afd61ba7",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -167,24 +167,24 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.5.6",
"version": "6.5.8",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "f092dd734083473658de3ee4bef093ed77d2689c"
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f092dd734083473658de3ee4bef093ed77d2689c",
"reference": "f092dd734083473658de3ee4bef093ed77d2689c",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981",
"reference": "a52f0440530b54fa079ce76e8c5d196a42cad981",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"guzzlehttp/psr7": "^1.9",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "^1.17.0"
"symfony/polyfill-intl-idn": "^1.17"
},
"require-dev": {
"ext-curl": "*",
@@ -262,7 +262,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
"source": "https://github.com/guzzle/guzzle/tree/6.5.6"
"source": "https://github.com/guzzle/guzzle/tree/6.5.8"
},
"funding": [
{
@@ -278,20 +278,20 @@
"type": "tidelift"
}
],
"time": "2022-05-25T13:19:12+00:00"
"time": "2022-06-20T22:16:07+00:00"
},
{
"name": "guzzlehttp/promises",
"version": "1.5.1",
"version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
"reference": "b94b2807d85443f9719887892882d0329d1e2598"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
"url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
"reference": "b94b2807d85443f9719887892882d0329d1e2598",
"shasum": ""
},
"require": {
@@ -346,7 +346,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.5.1"
"source": "https://github.com/guzzle/promises/tree/1.5.2"
},
"funding": [
{
@@ -362,20 +362,20 @@
"type": "tidelift"
}
],
"time": "2021-10-22T20:56:57+00:00"
"time": "2022-08-28T14:55:35+00:00"
},
{
"name": "guzzlehttp/psr7",
"version": "1.8.5",
"version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268"
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/337e3ad8e5716c15f9657bd214d16cc5e69df268",
"reference": "337e3ad8e5716c15f9657bd214d16cc5e69df268",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
"reference": "e98e3e6d4f86621a9b75f623996e6bbdeb4b9318",
"shasum": ""
},
"require": {
@@ -396,7 +396,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.7-dev"
"dev-master": "1.9-dev"
}
},
"autoload": {
@@ -456,7 +456,7 @@
],
"support": {
"issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.8.5"
"source": "https://github.com/guzzle/psr7/tree/1.9.0"
},
"funding": [
{
@@ -472,7 +472,7 @@
"type": "tidelift"
}
],
"time": "2022-03-20T21:51:18+00:00"
"time": "2022-06-20T21:43:03+00:00"
},
{
"name": "lusitanian/oauth",
@@ -922,16 +922,16 @@
},
{
"name": "s9e/sweetdom",
"version": "2.0.0",
"version": "2.1.0",
"source": {
"type": "git",
"url": "https://github.com/s9e/SweetDOM.git",
"reference": "5fc62bc1f4756650924e5cd1b429afcf34542722"
"reference": "9e34ff8f353234daed102274012c840bda56aff2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/s9e/SweetDOM/zipball/5fc62bc1f4756650924e5cd1b429afcf34542722",
"reference": "5fc62bc1f4756650924e5cd1b429afcf34542722",
"url": "https://api.github.com/repos/s9e/SweetDOM/zipball/9e34ff8f353234daed102274012c840bda56aff2",
"reference": "9e34ff8f353234daed102274012c840bda56aff2",
"shasum": ""
},
"require": {
@@ -960,22 +960,22 @@
],
"support": {
"issues": "https://github.com/s9e/SweetDOM/issues",
"source": "https://github.com/s9e/SweetDOM/tree/2.0.0"
"source": "https://github.com/s9e/SweetDOM/tree/2.1.0"
},
"time": "2020-12-08T16:34:58+00:00"
"time": "2021-05-24T21:06:33+00:00"
},
{
"name": "s9e/text-formatter",
"version": "2.11.2",
"version": "2.11.5",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
"reference": "34f49739a6cabd93579b94fe5380919af5404d18"
"reference": "186b633ee825a93e0060368bfdf8bd46311e3163"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/34f49739a6cabd93579b94fe5380919af5404d18",
"reference": "34f49739a6cabd93579b94fe5380919af5404d18",
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/186b633ee825a93e0060368bfdf8bd46311e3163",
"reference": "186b633ee825a93e0060368bfdf8bd46311e3163",
"shasum": ""
},
"require": {
@@ -1002,7 +1002,7 @@
},
"type": "library",
"extra": {
"version": "2.11.2"
"version": "2.11.5"
},
"autoload": {
"psr-4": {
@@ -1034,9 +1034,9 @@
],
"support": {
"issues": "https://github.com/s9e/TextFormatter/issues",
"source": "https://github.com/s9e/TextFormatter/tree/2.11.2"
"source": "https://github.com/s9e/TextFormatter/tree/2.11.5"
},
"time": "2022-06-05T19:21:32+00:00"
"time": "2022-09-19T00:20:37+00:00"
},
{
"name": "symfony/config",
@@ -1264,6 +1264,7 @@
"type": "tidelift"
}
],
"abandoned": "symfony/error-handler",
"time": "2020-10-24T10:57:07+00:00"
},
{
@@ -2656,16 +2657,16 @@
},
{
"name": "twig/twig",
"version": "v2.15.1",
"version": "v2.15.3",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
"reference": "3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4"
"reference": "ab402673db8746cb3a4c46f3869d6253699f614a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4",
"reference": "3b7cedb2f736899a7dbd0ba3d6da335a015f5cc4",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/ab402673db8746cb3a4c46f3869d6253699f614a",
"reference": "ab402673db8746cb3a4c46f3869d6253699f614a",
"shasum": ""
},
"require": {
@@ -2720,7 +2721,7 @@
],
"support": {
"issues": "https://github.com/twigphp/Twig/issues",
"source": "https://github.com/twigphp/Twig/tree/v2.15.1"
"source": "https://github.com/twigphp/Twig/tree/v2.15.3"
},
"funding": [
{
@@ -2732,7 +2733,7 @@
"type": "tidelift"
}
],
"time": "2022-05-17T05:46:24+00:00"
"time": "2022-09-28T08:40:08+00:00"
},
{
"name": "zendframework/zend-code",
@@ -3216,16 +3217,16 @@
},
{
"name": "phing/phing",
"version": "2.17.3",
"version": "2.17.4",
"source": {
"type": "git",
"url": "https://github.com/phingofficial/phing.git",
"reference": "053cb496cf49608d19f85664d85d71c48b241667"
"reference": "9f3bc8c72e65452686dcf64497e02a082f138908"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phingofficial/phing/zipball/053cb496cf49608d19f85664d85d71c48b241667",
"reference": "053cb496cf49608d19f85664d85d71c48b241667",
"url": "https://api.github.com/repos/phingofficial/phing/zipball/9f3bc8c72e65452686dcf64497e02a082f138908",
"reference": "9f3bc8c72e65452686dcf64497e02a082f138908",
"shasum": ""
},
"require": {
@@ -3308,7 +3309,7 @@
"support": {
"irc": "irc://irc.freenode.net/phing",
"issues": "https://www.phing.info/trac/report",
"source": "https://github.com/phingofficial/phing/tree/2.17.3"
"source": "https://github.com/phingofficial/phing/tree/2.17.4"
},
"funding": [
{
@@ -3324,20 +3325,20 @@
"type": "patreon"
}
],
"time": "2022-05-04T19:17:50+00:00"
"time": "2022-07-08T09:07:07+00:00"
},
{
"name": "php-webdriver/webdriver",
"version": "1.12.1",
"version": "1.13.1",
"source": {
"type": "git",
"url": "https://github.com/php-webdriver/php-webdriver.git",
"reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a"
"reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/b27ddf458d273c7d4602106fcaf978aa0b7fe15a",
"reference": "b27ddf458d273c7d4602106fcaf978aa0b7fe15a",
"url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/6dfe5f814b796c1b5748850aa19f781b9274c36c",
"reference": "6dfe5f814b796c1b5748850aa19f781b9274c36c",
"shasum": ""
},
"require": {
@@ -3387,9 +3388,9 @@
],
"support": {
"issues": "https://github.com/php-webdriver/php-webdriver/issues",
"source": "https://github.com/php-webdriver/php-webdriver/tree/1.12.1"
"source": "https://github.com/php-webdriver/php-webdriver/tree/1.13.1"
},
"time": "2022-05-03T12:16:34+00:00"
"time": "2022-10-11T11:49:44+00:00"
},
{
"name": "phpdocumentor/reflection-common",
@@ -4111,16 +4112,16 @@
},
{
"name": "sebastian/comparator",
"version": "3.0.3",
"version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "1071dfcef776a57013124ff35e1fc41ccd294758"
"reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758",
"reference": "1071dfcef776a57013124ff35e1fc41ccd294758",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
"reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770",
"shasum": ""
},
"require": {
@@ -4173,7 +4174,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3"
"source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5"
},
"funding": [
{
@@ -4181,7 +4182,7 @@
"type": "github"
}
],
"time": "2020-11-30T08:04:30+00:00"
"time": "2022-09-14T12:31:48+00:00"
},
{
"name": "sebastian/diff",
@@ -4314,16 +4315,16 @@
},
{
"name": "sebastian/exporter",
"version": "3.1.4",
"version": "3.1.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db"
"reference": "73a9676f2833b9a7c36968f9d882589cd75511e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6",
"reference": "73a9676f2833b9a7c36968f9d882589cd75511e6",
"shasum": ""
},
"require": {
@@ -4379,7 +4380,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4"
"source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5"
},
"funding": [
{
@@ -4387,7 +4388,7 @@
"type": "github"
}
],
"time": "2021-11-11T13:51:24+00:00"
"time": "2022-09-14T06:00:17+00:00"
},
{
"name": "sebastian/global-state",
@@ -4720,16 +4721,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.6.2",
"version": "3.7.1",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a"
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
"reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
"shasum": ""
},
"require": {
@@ -4772,7 +4773,7 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2021-12-12T21:44:58+00:00"
"time": "2022-06-18T07:21:10+00:00"
},
{
"name": "symfony/browser-kit",
@@ -5081,7 +5082,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.1.3",
"php": "^7.1.3 || ^8.0.0",
"ext-json": "*",
"ext-mbstring": "*"
},

View File

@@ -12,6 +12,9 @@
*/
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Exception\ExceptionInterface;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
*/
@@ -28,10 +31,49 @@ $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');
$response = new RedirectResponse(
$controller_helper->route('phpbb_cron_run', $get_params_array, false),
301
$cron_route = 'phpbb_cron_run';
try
{
$response = new RedirectResponse(
$controller_helper->route($cron_route, $get_params_array, false),
Response::HTTP_MOVED_PERMANENTLY
);
$response->send();
$http_kernel->terminate($symfony_request, $response);
exit();
}
catch (RouteNotFoundException $exception)
{
$error = 'ROUTE_NOT_FOUND';
$error_parameters = $cron_route;
$error_code = Response::HTTP_NOT_FOUND;
}
catch (ExceptionInterface $exception)
{
$error = 'ROUTE_INVALID_MISSING_PARAMS';
$error_parameters = $cron_route;
$error_code = Response::HTTP_BAD_REQUEST;
}
catch (Throwable $exception)
{
$error = $exception->getMessage();
$error_parameters = [];
$error_code = Response::HTTP_INTERNAL_SERVER_ERROR;
}
$language = $phpbb_container->get('language');
$response = new Response(
$language->lang($error, $error_parameters),
$error_code
);
$response->send();
$http_kernel->terminate($symfony_request, $response);

View File

@@ -50,6 +50,10 @@
<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>
<li><a href="#v337">Changes since 3.3.7</a></li>
<li><a href="#v336">Changes since 3.3.6</a></li>
<li><a href="#v336rc1">Changes since 3.3.6-RC1</a></li>
@@ -162,6 +166,77 @@
<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>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16938">PHPBB3-16938</a>] - Unexistent css property in inline style</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17039">PHPBB3-17039</a>] - Group name not colored in manage groups due to typo</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17056">PHPBB3-17056</a>] - PHP 8.2 Deprecation warning about ${var} syntax</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17065">PHPBB3-17065</a>] - Emoji characters in MCP add feedback cause SQL error</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17074">PHPBB3-17074</a>] - Condition to avoid creation of roles with same name is broken</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17081">PHPBB3-17081</a>] - Invalid accept attribute in the post editor</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17082">PHPBB3-17082</a>] - Ability to warn Anonymous</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-13291">PHPBB3-13291</a>] - Close notification drop down after clicking &quot;mark all read&quot;</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16105">PHPBB3-16105</a>] - Use &quot;global&quot; reCAPTCHA domain to circumvent blocking in some countries</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17068">PHPBB3-17068</a>] - ALLOW_CDN_EXPLAIN: Incomplete and imprecise description</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17075">PHPBB3-17075</a>] - Add template events to ACP footer after SCRIPTS</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17066">PHPBB3-17066</a>] - Update GitHub Actions configuration to resolve deprecations</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17071">PHPBB3-17071</a>] - Update the emoji CDN</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-275">SECURITY-275</a>] - Improve handling of exceptions in cron redirect</li>
</ul>
<a name="v339rc1"></a><h3>Changes since 3.3.9-RC1</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17058">PHPBB3-17058</a>] - Special character issue in emails from PHP 8.0 and higher</li>
</ul>
<h4>Hardening</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/SECURITY-274">SECURITY-274</a>] - Reset login keys/session when resetting password</li>
</ul>
<a name="v338"></a><h3>Changes since 3.3.8</h3>
<h4>Bug</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16917">PHPBB3-16917</a>] - bin/phpbb.cli requires 755 permissions</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16932">PHPBB3-16932</a>] - Invalid email To: header on notifications to users with @ in name</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17003">PHPBB3-17003</a>] - Icon of a topic do not show up in the UCP &gt; Front Page.</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17019">PHPBB3-17019</a>] - Missing &quot;youtube&quot; profilefield stops Database update</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17023">PHPBB3-17023</a>] - phpBB 3.3: PHP8 supported but not indicated by composer.json</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17026">PHPBB3-17026</a>] - Session viewonline not defined in Memberlist</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17030">PHPBB3-17030</a>] - Feed doesn't generate valid RFC-3339 dates</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17032">PHPBB3-17032</a>] - Missing or invalid user entry for anonymous user may result in stack overflow</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17036">PHPBB3-17036</a>] - Update guzzle to latest version</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17050">PHPBB3-17050</a>] - Unnecessary trailing slash in void HTML elements</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17051">PHPBB3-17051</a>] - Textformatter may generate PHP warnings if user is not fully initialized in PHP 8.1</li>
</ul>
<h4>Improvement</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-16916">PHPBB3-16916</a>] - Enhance the PHP version error message on startup and install</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17005">PHPBB3-17005</a>] - List item closing tag missing slash in posting_topic_review</li>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17006">PHPBB3-17006</a>] - &quot;www.&quot; not needed and may lead to confusion</li>
</ul>
<h4>Task</h4>
<ul>
<li>[<a href="https://tracker.phpbb.com/browse/PHPBB3-17048">PHPBB3-17048</a>] - Update composer and dependencies for 3.3.9</li>
</ul>
<a name="v337"></a><h3>Changes since 3.3.7</h3>
<h4>Bug</h4>
<ul>

View File

@@ -274,6 +274,12 @@ acp_overall_footer_after
* Since: 3.1.0-a1
* Purpose: Add content below the footer in the ACP
acp_overall_footer_body_after
===
* Location: adm/style/overall_footer.html
* Since: 3.3.10-RC1
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
acp_overall_header_body_before
===
* Location: adm/style/overall_header.html
@@ -558,6 +564,12 @@ acp_simple_footer_after
* Since: 3.1.0-a1
* Purpose: Add content below the simple footer in the ACP
acp_simple_footer_body_after
===
* Location: adm/style/simple_footer.html
* Since: 3.3.10-RC1
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
acp_simple_header_body_before
===
* Location: adm/style/simple_header.html

View File

@@ -179,7 +179,7 @@ class acp_permission_roles
$db->sql_freeresult($result);
// Make sure we only print out the error if we add the role or change it's name
if ($row && ($mode == 'add' || ($mode == 'edit' && $role_row['role_name'] != $role_name)))
if ($row && ($action == 'add' || ($action == 'edit' && $role_row['role_name'] != $role_name)))
{
trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . adm_back_link($this->u_action), E_USER_WARNING);
}

View File

@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
@define('PHPBB_VERSION', '3.3.8');
@define('PHPBB_VERSION', '3.3.10');
// QA-related
// define('PHPBB_QA', 1);

View File

@@ -597,7 +597,7 @@ class messenger
$this->from = $board_contact;
}
$encode_eol = ($config['smtp_delivery']) ? "\r\n" : PHP_EOL;
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
// Build to, cc and bcc strings
$to = $cc = $bcc = '';
@@ -629,7 +629,7 @@ class messenger
}
else
{
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, PHP_EOL, $err_msg);
$result = phpbb_mail($mail_to, $this->subject, $this->msg, $headers, $encode_eol, $err_msg);
}
if (!$result)
@@ -952,7 +952,8 @@ class queue
}
else
{
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
$encode_eol = $config['smtp_delivery'] || PHP_VERSION_ID >= 80000 ? "\r\n" : PHP_EOL;
$result = phpbb_mail($to, $subject, $msg, $headers, $encode_eol, $err_msg);
}
if (!$result)
@@ -1882,7 +1883,7 @@ function mail_encode($str, $eol = "\r\n")
{
$encoded_char = $is_quoted_printable
? $char = preg_replace_callback(
'/[=_\?\x20\x00-\x1F\x80-\xFF]/',
'/[()<>@,;:\\\\".\[\]=_?\x20\x00-\x1F\x80-\xFF]/',
function ($matches)
{
$hex = dechex(ord($matches[0]));

View File

@@ -834,7 +834,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
'FILESIZE' => $config['max_filesize'],
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(',', $allowed_attachments) : '',
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? '.' . implode(',.', $allowed_attachments) : '',
];
/**

View File

@@ -98,7 +98,7 @@ class mcp_notes
$userrow = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$userrow)
if (!$userrow || (int) $userrow['user_id'] === ANONYMOUS)
{
trigger_error('NO_USER');
}
@@ -162,16 +162,16 @@ class mcp_notes
{
if (check_form_key('mcp_notes'))
{
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array($userrow['username']));
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, array(
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, [$userrow['username']]);
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_USER_FEEDBACK', false, [
'forum_id' => 0,
'topic_id' => 0,
$userrow['username']
));
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_GENERAL', false, array(
]);
$phpbb_log->add('user', $user->data['user_id'], $user->ip, 'LOG_USER_GENERAL', false, [
'reportee_id' => $user_id,
$usernote
));
utf8_encode_ucr($usernote)
]);
$msg = $user->lang['USER_FEEDBACK_ADDED'];
}

View File

@@ -386,7 +386,7 @@ class mcp_warn
$user_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
if (!$user_row)
if (!$user_row || (int) $user_row['user_id'] === ANONYMOUS)
{
trigger_error('NO_USER');
}

View File

@@ -27,7 +27,7 @@ error_reporting($level);
*/
if (version_compare(PHP_VERSION, '7.1.3', '<'))
{
die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
die('You are running an unsupported PHP version (' . PHP_VERSION . '). Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
}
// Register globals and magic quotes have been dropped in PHP 5.4 so no need for extra checks

View File

@@ -35,7 +35,7 @@ class ucp_main
function main($id, $mode)
{
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher, $cache;
global $request;
switch ($mode)
@@ -44,8 +44,8 @@ class ucp_main
$user->add_lang('memberlist');
$sql_from = TOPICS_TABLE . ' t ';
$sql_select = '';
$sql_from = TOPICS_TABLE . ' t LEFT JOIN ' . FORUMS_TABLE . ' f ON (f.forum_id = t.forum_id) ';
$sql_select = ', f.enable_icons';
if ($config['load_db_track'])
{
@@ -137,6 +137,9 @@ class ucp_main
}
unset($topic_forum_list);
// Grab icons
$icons = $cache->obtain_icons();
foreach ($topic_list as $topic_id)
{
$row = &$rowset[$topic_id];
@@ -176,10 +179,14 @@ class ucp_main
'TOPIC_TITLE' => censor_text($row['topic_title']),
'TOPIC_TYPE' => $topic_type,
'TOPIC_ICON_IMG' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['img'] : '',
'TOPIC_ICON_IMG_WIDTH' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['width'] : '',
'TOPIC_ICON_IMG_HEIGHT' => !empty($icons[$row['icon_id']]) ? $icons[$row['icon_id']]['height'] : '',
'TOPIC_IMG_STYLE' => $folder_img,
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id) && $row['topic_attachment']) ? $user->img('icon_topic_attach', '') : '',
'S_TOPIC_ICONS' => $row['enable_icons'] ? true : false,
'S_USER_POSTED' => (!empty($row['topic_posted']) && $row['topic_posted']) ? true : false,
'S_UNREAD' => $unread_topic,

View File

@@ -22,7 +22,7 @@ $phpEx = substr(strrchr(__FILE__, '.'), 1);
if (version_compare(PHP_VERSION, '7.1.3', '<'))
{
die('You are running an unsupported PHP version. Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
die('You are running an unsupported PHP version (' . PHP_VERSION . '). Please upgrade to PHP 7.1.3 or higher before trying to install or update to phpBB 3.3');
}
$startup_new_path = $phpbb_root_path . 'install/update/update/new/install/startup.' . $phpEx;

View File

@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
'phpbb_version' => '3.3.8',
'phpbb_version' => '3.3.10',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,

View File

@@ -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.8');
define('PHPBB_VERSION', '3.3.10');
$phpbb_root_path = __DIR__ . '/../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

View File

@@ -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.8');
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');

View File

@@ -386,7 +386,7 @@ $lang = array_merge($lang, array(
'ACP_LOAD_SETTINGS_EXPLAIN' => 'Here you can enable and disable certain board functions to reduce the amount of processing required. On most servers there is no need to disable any functions. However on certain systems or in shared hosting environments it may be beneficial to disable capabilities you do not really need. You can also specify limits for system load and active sessions beyond which the board will go offline.',
'ALLOW_CDN' => 'Allow usage of third party content delivery networks',
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth required by your server, but may present a privacy issue for some board administrators. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Googles content delivery network.',
'ALLOW_CDN_EXPLAIN' => 'If this setting is enabled, some files will be served from external third party servers instead of your server. This reduces the network bandwidth used by your server, but may present a privacy issue in some countries. In a default phpBB installation, this includes loading “jQuery” and the font “Open Sans” from Googles content delivery network. This also applies to the “Font Awesome” font, which phpBB and some extensions use to render icons.',
'ALLOW_LIVE_SEARCHES' => 'Allow live searches',
'ALLOW_LIVE_SEARCHES_EXPLAIN' => 'If this setting is enabled, users are provided with keyword suggestions as they type in certain fields throughout the board.',
'CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
@@ -483,7 +483,7 @@ $lang = array_merge($lang, array(
'SCRIPT_PATH' => 'Script path',
'SCRIPT_PATH_EXPLAIN' => 'The path where phpBB is located relative to the domain name, e.g. <samp>/phpBB3</samp>.',
'SERVER_NAME' => 'Domain name',
'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: <samp>www.example.com</samp>).',
'SERVER_NAME_EXPLAIN' => 'The domain name this board runs from (for example: <samp>example.com</samp>).',
'SERVER_PORT' => 'Server port',
'SERVER_PORT_EXPLAIN' => 'The port your server is running on, usually 80, only change if different.',
'SERVER_PROTOCOL' => 'Server protocol',

View File

@@ -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',

View File

@@ -678,6 +678,10 @@ $lang = array_merge($lang, array(
'RETURN_TOPIC' => '%sReturn to the topic last visited%s',
'RETURN_TO' => 'Return to “%s”',
'RETURN_TO_INDEX' => 'Return to Board Index',
'ROUTE_NOT_FOUND' => 'The requested route “%s” could not be found.',
'ROUTE_INVALID_MISSING_PARAMS' => 'Invalid or missing parameters passed for route “%s”.',
'FEED' => 'Feed',
'FEED_NEWS' => 'News',
'FEED_TOPICS_ACTIVE' => 'Active Topics',

View File

@@ -1634,17 +1634,20 @@ switch ($mode)
if (count($user_list))
{
// Session time?! Session time...
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time
$sql = 'SELECT session_user_id, MAX(session_time) AS session_time, MIN(session_viewonline) AS session_viewonline
FROM ' . SESSIONS_TABLE . '
WHERE session_time >= ' . (time() - $config['session_length']) . '
AND ' . $db->sql_in_set('session_user_id', $user_list) . '
GROUP BY session_user_id';
$result = $db->sql_query($sql);
$session_times = array();
$session_ary = [];
while ($row = $db->sql_fetchrow($result))
{
$session_times[$row['session_user_id']] = $row['session_time'];
$session_ary[$row['session_user_id']] = [
'session_time' => $row['session_time'],
'session_viewonline' => $row['session_viewonline'],
];
}
$db->sql_freeresult($result);
@@ -1708,7 +1711,8 @@ switch ($mode)
$id_cache = array();
while ($row = $db->sql_fetchrow($result))
{
$row['session_time'] = (!empty($session_times[$row['user_id']])) ? $session_times[$row['user_id']] : 0;
$row['session_time'] = $session_ary[$row['user_id']]['session_time'] ?? 0;
$row['session_viewonline'] = $session_ary[$row['user_id']]['session_viewonline'] ?? 0;
$row['last_visit'] = (!empty($row['session_time'])) ? $row['session_time'] : $row['user_lastvisit'];
$id_cache[$row['user_id']] = $row;

View File

@@ -15,18 +15,13 @@ namespace phpbb\captcha\plugins;
class recaptcha extends captcha_abstract
{
var $recaptcha_server = 'http://www.google.com/recaptcha/api';
var $recaptcha_server_secure = 'https://www.google.com/recaptcha/api'; // class constants :(
var $response;
private $response;
/**
* Constructor
*/
public function __construct()
{
global $request;
$this->recaptcha_server = $request->is_secure() ? $this->recaptcha_server_secure : $this->recaptcha_server;
}
function init($type)
@@ -94,6 +89,12 @@ class recaptcha extends captcha_abstract
}
}
$recaptcha_domain = $request->variable('recaptcha_v2_domain', '', true);
if (in_array($recaptcha_domain, recaptcha_v3::$supported_domains))
{
$config->set('recaptcha_v2_domain', $recaptcha_domain);
}
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
}
@@ -110,9 +111,11 @@ class recaptcha extends captcha_abstract
}
$template->assign_vars(array(
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_service_name(),
'U_ACTION' => $module->u_action,
'CAPTCHA_PREVIEW' => $this->get_demo_template($id),
'CAPTCHA_NAME' => $this->get_service_name(),
'RECAPTCHA_V2_DOMAIN' => $config['recaptcha_v2_domain'] ?? recaptcha_v3::GOOGLE,
'RECAPTCHA_V2_DOMAINS' => recaptcha_v3::$supported_domains,
'U_ACTION' => $module->u_action,
));
}
@@ -140,9 +143,10 @@ class recaptcha extends captcha_abstract
{
$contact_link = phpbb_get_board_contact_link($config, $phpbb_root_path, $phpEx);
$explain = $user->lang(($this->type != CONFIRM_POST) ? 'CONFIRM_EXPLAIN' : 'POST_CONFIRM_EXPLAIN', '<a href="' . $contact_link . '">', '</a>');
$domain = $config['recaptcha_v2_domain'] ?? recaptcha_v3::GOOGLE;
$template->assign_vars(array(
'RECAPTCHA_SERVER' => $this->recaptcha_server,
'RECAPTCHA_SERVER' => sprintf('//%1$s/recaptcha/api', $domain),
'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '',
'S_RECAPTCHA_AVAILABLE' => self::is_available(),
'S_CONFIRM_CODE' => true,

View File

@@ -30,6 +30,14 @@ class recaptcha_v3 extends captcha_abstract
*/
const GOOGLE = 'google.com';
const RECAPTCHA = 'recaptcha.net';
const RECAPTCHA_CN = 'recaptcha.google.cn';
/** @var string[] List of supported domains */
static public $supported_domains = [
self::GOOGLE,
self::RECAPTCHA,
self::RECAPTCHA_CN
];
/** @var array CAPTCHA types mapped to their action */
static protected $actions = [
@@ -180,9 +188,14 @@ class recaptcha_v3 extends captcha_abstract
trigger_error($language->lang('EMPTY_RECAPTCHA_V3_REQUEST_METHOD') . adm_back_link($module->u_action), E_USER_WARNING);
}
$recaptcha_domain = $request->variable('recaptcha_v3_domain', '', true);
if (in_array($recaptcha_domain, self::$supported_domains))
{
$config->set('recaptcha_v3_domain', $recaptcha_domain);
}
$config->set('recaptcha_v3_key', $request->variable('recaptcha_v3_key', '', true));
$config->set('recaptcha_v3_secret', $request->variable('recaptcha_v3_secret', '', true));
$config->set('recaptcha_v3_domain', $request->variable('recaptcha_v3_domain', '', true));
$config->set('recaptcha_v3_method', $recaptcha_v3_method);
foreach (self::$actions as $action)
@@ -211,7 +224,7 @@ class recaptcha_v3 extends captcha_abstract
'RECAPTCHA_V3_SECRET' => $config['recaptcha_v3_secret'] ?? '',
'RECAPTCHA_V3_DOMAIN' => $config['recaptcha_v3_domain'] ?? self::GOOGLE,
'RECAPTCHA_V3_DOMAINS' => [self::GOOGLE, self::RECAPTCHA],
'RECAPTCHA_V3_DOMAINS' => self::$supported_domains,
'RECAPTCHA_V3_METHOD' => $config['recaptcha_v3_method'] ?? '',
'RECAPTCHA_V3_METHODS' => [

View File

@@ -30,7 +30,7 @@ class profilefield_youtube_update extends \phpbb\db\migration\migration
$row = $this->db->sql_fetchrow($result);
$this->db->sql_freeresult($result);
return $row['field_validation'] === $this->youtube_url_matcher;
return !$row || $row['field_validation'] === $this->youtube_url_matcher;
}
public static function depends_on()

View 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']],
];
}
}

View 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 v3310rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.10-RC1', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v339',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.10-RC1']],
];
}
}

View 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 v339 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.9', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v339rc1',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.9']],
];
}
}

View 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 v339rc1 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
return version_compare($this->config['version'], '3.3.9-RC1', '>=');
}
public static function depends_on()
{
return [
'\phpbb\db\migration\data\v33x\v338',
];
}
public function update_data()
{
return [
['config.update', ['version', '3.3.9-RC1']],
];
}
}

View File

@@ -182,7 +182,7 @@ class mssql extends tools
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen"
{
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
// here we add the definition of the new column to the list of columns

View File

@@ -147,7 +147,7 @@ class postgres extends tools
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen"
{
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
// here we add the definition of the new column to the list of columns

View File

@@ -275,7 +275,7 @@ class tools implements tools_interface
if (isset($prepared_column['auto_increment']) && $prepared_column['auto_increment'] && strlen($column_name) > 26) // "${column_name}_gen"
{
trigger_error("Index name '${column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
trigger_error("Index name '{$column_name}_gen' on table '$table_name' is too long. The maximum auto increment column length is 26 characters.", E_USER_ERROR);
}
// here we add the definition of the new column to the list of columns

View File

@@ -97,7 +97,7 @@ class helper
if (empty($offset_string))
{
$zone_offset = $this->user->create_datetime()->getOffset();
$offset_string = phpbb_format_timezone_offset($zone_offset);
$offset_string = phpbb_format_timezone_offset($zone_offset, true);
}
return gmdate("Y-m-d\TH:i:s", $time + $zone_offset) . $offset_string;

View File

@@ -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
{

View File

@@ -62,27 +62,27 @@ class assets_bag
}
/**
* Returns the HTML code to includes all css assets
* Returns the HTML code to include all css assets
*
* @return string
*/
public function get_stylesheets_content()
public function get_stylesheets_content(): string
{
$output = '';
foreach ($this->stylesheets as $stylesheet)
{
$output .= "<link href=\"{$stylesheet->get_url()}\" rel=\"stylesheet\" media=\"screen\" />\n";
$output .= "<link href=\"{$stylesheet->get_url()}\" rel=\"stylesheet\" media=\"screen\">\n";
}
return $output;
}
/**
* Returns the HTML code to includes all js assets
* Returns the HTML code to include all js assets
*
* @return string
*/
public function get_scripts_content()
public function get_scripts_content(): string
{
$output = '';
foreach ($this->scripts as $script)

View File

@@ -356,10 +356,10 @@ class factory implements \phpbb\textformatter\cache_interface
$tag = $configurator->Emoji->getTag();
$tag->template = '<xsl:choose>
<xsl:when test="@tseq">
<img alt="{.}" class="emoji" draggable="false" src="//twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>
<img alt="{.}" class="emoji" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/{@tseq}.svg"/>
</xsl:when>
<xsl:otherwise>
<img alt="{.}" class="emoji" draggable="false" src="https://cdn.jsdelivr.net/gh/s9e/emoji-assets-twemoji@11.2/dist/svgz/{@seq}.svgz"/>
<img alt="{.}" class="emoji" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/{@seq}.svg"/>
</xsl:otherwise>
</xsl:choose>';
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';

View File

@@ -152,7 +152,7 @@ class renderer implements \phpbb\textformatter\renderer_interface
* @param \phpbb\user $user
* @param \phpbb\config\config $config
* @param \phpbb\auth\auth $auth
* @return null
* @return void
*/
public function configure_user(\phpbb\user $user, \phpbb\config\config $config, \phpbb\auth\auth $auth)
{
@@ -175,10 +175,10 @@ class renderer implements \phpbb\textformatter\renderer_interface
// Set this user's style id and other parameters
$this->renderer->setParameters(array(
'S_IS_BOT' => $user->data['is_bot'],
'S_REGISTERED_USER' => $user->data['is_registered'],
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS),
'STYLE_ID' => $user->style['style_id'],
'S_IS_BOT' => $user->data['is_bot'] ?? false,
'S_REGISTERED_USER' => $user->data['is_registered'] ?? false,
'S_USER_LOGGED_IN' => ($user->data['user_id'] != ANONYMOUS),
'STYLE_ID' => $user->style['style_id'],
));
}

View File

@@ -415,6 +415,7 @@ class reset_password
SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
WHERE user_id = ' . (int) $user_row['user_id'];
$this->db->sql_query($sql);
$this->user->reset_login_keys();
$this->log->add('user', $user_row['user_id'], $this->user->ip, 'LOG_USER_NEW_PASSWORD', false, [
'reportee_id' => $user_row['user_id'],
$user_row['username']

View File

@@ -141,7 +141,7 @@ class user_loader
{
$this->load_users(array($user_id));
return $this->get_user($user_id);
return $user_id != ANONYMOUS ? $this->get_user($user_id) : $this->users[$user_id] ?? false;
}
return $this->get_user(ANONYMOUS);

View File

@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
style_version = 3.3.8
phpbb_version = 3.3.8
style_version = 3.3.10
phpbb_version = 3.3.10
# Defining a different template bitfield
# template_bitfield = //g=

View File

@@ -101,6 +101,7 @@ phpbb.addAjaxCallback('mark_topics_read', function(res, updateTopicLinks) {
phpbb.addAjaxCallback('notification.mark_all_read', function(res) {
if (typeof res.success !== 'undefined') {
phpbb.markNotifications($('#notification_list li.bg2'), 0);
phpbb.toggleDropdown.call($('#notification_list_button'));
phpbb.closeDarkenWrapper(3000);
}
});

View File

@@ -35,7 +35,7 @@
<a href="{topic_review_row.U_MCP_DETAILS}" title="{L_POST_DETAILS}" class="button button-icon-only">
<i class="icon fa-info fa-fw" aria-hidden="true"></i><span class="sr-only">{L_POST_DETAILS}</span>
</a>
<li>
</li>
<!-- ENDIF -->
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
<li>

View File

@@ -1,6 +1,6 @@
<!-- INCLUDE ucp_header.html -->
<h2<!-- IF GROUP_COLOR --> style="color:#{GROUP_COLOR};"<!-- ENDIF -->>{L_USERGROUPS}<!-- IF GROUP_NAME --> :: {GROUP_NAME}<!-- ENDIF --></h2>
<h2<!-- IF GROUP_COLOUR --> style="color:#{GROUP_COLOUR};"<!-- ENDIF -->>{L_USERGROUPS}<!-- IF GROUP_NAME --> :: {GROUP_NAME}<!-- ENDIF --></h2>
<form id="ucp" method="post" action="{S_UCP_ACTION}"{S_FORM_ENCTYPE}>

View File

@@ -14,7 +14,7 @@
<!-- BEGIN topicrow -->
<li class="row<!-- IF topicrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl class="row-item {topicrow.TOPIC_IMG_STYLE}">
<dt <!-- IF topicrow.TOPIC_ICON_IMG -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
<dt <!-- IF topicrow.TOPIC_ICON_IMG and topicrow.S_TOPIC_ICONS -->style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF -->>
<!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="row-item-link"></a><!-- ENDIF -->
<div class="list-inner">
<!-- IF topicrow.S_UNREAD -->

View File

@@ -92,7 +92,7 @@ class phpbb_functional_acp_permissions_test extends phpbb_functional_test_case
public function test_change_permission($description, $permission_type, $permission, $mode, $object_name, $object_id)
{
// Get the form
$crawler = self::request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&${object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid);
$crawler = self::request('GET', "adm/index.php?i=acp_permissions&icat=16&mode=$mode&{$object_name}[0]=$object_id&type=$permission_type&sid=" . $this->sid);
$this->assertStringContainsString($this->lang('ACL_SET'), $crawler->filter('h1')->eq(1)->text());
// XXX globals for \phpbb\auth\auth, refactor it later

View File

@@ -95,19 +95,19 @@ class phpbb_template_template_includecss_test extends phpbb_template_template_te
*/
array(
array('TEST' => 1),
'<link href="tests/template/templates/child_only.css?assets_version=1" rel="stylesheet" media="screen" />',
'<link href="tests/template/templates/child_only.css?assets_version=1" rel="stylesheet" media="screen">',
),
array(
array('TEST' => 2),
'<link href="tests/template/parent_templates/parent_only.css?assets_version=1" rel="stylesheet" media="screen" />',
'<link href="tests/template/parent_templates/parent_only.css?assets_version=1" rel="stylesheet" media="screen">',
),
array(
array('TEST' => 3),
'<link href="tests/template/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" media="screen" />',
'<link href="tests/template/ext/include/css/styles/all/theme/test.css?assets_version=1" rel="stylesheet" media="screen">',
),
array(
array('TEST' => 4),
'<link href="tests/template/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" media="screen" />',
'<link href="tests/template/ext/include/css/styles/all/theme/child_only.css?assets_version=1" rel="stylesheet" media="screen">',
),
);
}

View File

@@ -310,7 +310,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
),
array(
"Emoji: \xF0\x9F\x98\x80",
'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f600.svg">'
'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f600.svg">'
),
array(
"Emoji: \xF0\x9F\x98\x80",

View File

@@ -1 +1 @@
<img class="smilies" src="phpBB/images/smilies/icon_e_surprised.gif" width="15" height="17" alt=":o" title="First half of :ok:"> <img class="smilies" src="phpBB/images/smilies/icon_lol.gif" width="15" height="17" alt="k:" title="Second half of :ok:"> <img alt=":ok:" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f197.svg">
<img class="smilies" src="phpBB/images/smilies/icon_e_surprised.gif" width="15" height="17" alt=":o" title="First half of :ok:"> <img class="smilies" src="phpBB/images/smilies/icon_lol.gif" width="15" height="17" alt="k:" title="Second half of :ok:"> <img alt=":ok:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f197.svg">

View File

@@ -1 +1 @@
<img alt=":man_judge:" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f468-200d-2696-fe0f.svg"> <img alt="👨‍⚖️" class="emoji smilies" draggable="false" src="//twemoji.maxcdn.com/2/svg/1f468-200d-2696-fe0f.svg">
<img alt=":man_judge:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f468-200d-2696-fe0f.svg"> <img alt="👨‍⚖️" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f468-200d-2696-fe0f.svg">

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<table name="phpbb_users">
<column>user_id</column>
<column>user_permissions</column>
<column>username</column>
<column>username_clean</column>
<column>user_sig</column>
<row>
<value>2</value>
<value></value>
<value>Admin</value>
<value>admin</value>
<value></value>
</row>
<row>
<value>3</value>
<value></value>
<value>Test</value>
<value>test</value>
<value></value>
</row>
</table>
</dataset>

View File

@@ -0,0 +1,87 @@
<?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.
*
*/
class phpbb_user_loader_no_guest_test extends phpbb_database_test_case
{
protected $db;
protected $user_loader;
public function getDataSet()
{
return $this->createXMLDataSet(__DIR__ . '/fixtures/user_loader_no_guest.xml');
}
protected function setUp(): void
{
parent::setUp();
$this->db = $this->new_dbal();
$this->user_loader = new \phpbb\user_loader($this->db, __DIR__ . '/../../phpBB/', 'php', 'phpbb_users');
}
public function test_load_get()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(1);
$this->assertFalse($user);
$user = $this->user_loader->get_user(2);
$this->assertEquals(2, $user['user_id']);
$this->assertEquals('Admin', $user['username']);
}
public function test_load_get_unloaded()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(3);
$this->assertFalse($user);
$user = $this->user_loader->get_user(3, true);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
public function test_load_get_invalid()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(9);
$this->assertFalse($user);
$user = $this->user_loader->get_user(3, true);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
public function test_load_get_invalid_query()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(9, true);
$this->assertFalse($user);
$user = $this->user_loader->get_user(3, true);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
public function test_load_user_by_username()
{
$user_id = $this->user_loader->load_user_by_username('Test');
$user = $this->user_loader->get_user($user_id);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
}

View File

@@ -55,6 +55,32 @@ class phpbb_user_loader_test extends phpbb_database_test_case
$this->assertEquals('Test', $user['username']);
}
public function test_load_get_invalid()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(9);
$this->assertEquals(1, $user['user_id']);
$this->assertEquals('Guest', $user['username']);
$user = $this->user_loader->get_user(3, true);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
public function test_load_get_invalid_query()
{
$this->user_loader->load_users(array(2));
$user = $this->user_loader->get_user(9, true);
$this->assertEquals(1, $user['user_id']);
$this->assertEquals('Guest', $user['username']);
$user = $this->user_loader->get_user(3, true);
$this->assertEquals(3, $user['user_id']);
$this->assertEquals('Test', $user['username']);
}
public function test_load_user_by_username()
{
$user_id = $this->user_loader->load_user_by_username('Test');