GitHub/WoltLab/WCF.git
4 years agoMerge branch 'master' into session-meta
Tim Düsterhus [Wed, 21 Oct 2020 13:58:51 +0000 (15:58 +0200)]
Merge branch 'master' into session-meta

For the updated CodeSniffer.

4 years agoLimit branches for templates workflow
Tim Düsterhus [Wed, 21 Oct 2020 13:43:44 +0000 (15:43 +0200)]
Limit branches for templates workflow

4 years agoMerge branch '5.3' into master
Tim Düsterhus [Wed, 21 Oct 2020 13:43:21 +0000 (15:43 +0200)]
Merge branch '5.3' into master

4 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Wed, 21 Oct 2020 13:42:15 +0000 (15:42 +0200)]
Merge branch '5.2' into 5.3

4 years agoLimit workflows to release branches
Tim Düsterhus [Wed, 21 Oct 2020 13:39:04 +0000 (15:39 +0200)]
Limit workflows to release branches

Features branches will be tested using a PR.

4 years agoMerge pull request #3622 from WoltLab/workflow-style
Tim Düsterhus [Wed, 21 Oct 2020 13:37:16 +0000 (15:37 +0200)]
Merge pull request #3622 from WoltLab/workflow-style

Add codestyle workflow

4 years agoAdd codestyle workflow
Tim Düsterhus [Wed, 21 Oct 2020 13:03:35 +0000 (15:03 +0200)]
Add codestyle workflow

4 years agoAdd .phpcs.xml
Tim Düsterhus [Wed, 21 Oct 2020 13:18:26 +0000 (15:18 +0200)]
Add .phpcs.xml

4 years agoMerge pull request #3617 from WoltLab/formbuilder-php8
Tim Düsterhus [Wed, 21 Oct 2020 13:13:28 +0000 (15:13 +0200)]
Merge pull request #3617 from WoltLab/formbuilder-php8

Fix PHP 8 support in form builder

4 years agoUse stock OpeningFunctionBraceKernighanRitchie sniff
Tim Düsterhus [Wed, 21 Oct 2020 13:00:21 +0000 (15:00 +0200)]
Use stock OpeningFunctionBraceKernighanRitchie sniff

4 years agoUpdate CodeSniffer ruleset
Tim Düsterhus [Wed, 21 Oct 2020 12:50:06 +0000 (14:50 +0200)]
Update CodeSniffer ruleset

4 years agoMerge branch '5.3' into master
Tim Düsterhus [Wed, 21 Oct 2020 12:47:07 +0000 (14:47 +0200)]
Merge branch '5.3' into master

4 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Wed, 21 Oct 2020 12:46:52 +0000 (14:46 +0200)]
Merge branch '5.2' into 5.3

4 years agoTighten up the code style a bit
Tim Düsterhus [Wed, 21 Oct 2020 12:46:13 +0000 (14:46 +0200)]
Tighten up the code style a bit

4 years agoRemove `final` from `UserEditor::getPasswordHash()`
Tim Düsterhus [Wed, 21 Oct 2020 11:49:30 +0000 (13:49 +0200)]
Remove `final` from `UserEditor::getPasswordHash()`

In PHP 8:

> Private methods cannot be final as they are never overridden by other classes

4 years agoMerge pull request #3621 from WoltLab/workflow-templates
Tim Düsterhus [Wed, 21 Oct 2020 11:09:13 +0000 (13:09 +0200)]
Merge pull request #3621 from WoltLab/workflow-templates

Add templates workflow

4 years agoMerge branch 'master' into session-meta
Tim Düsterhus [Wed, 21 Oct 2020 10:57:38 +0000 (12:57 +0200)]
Merge branch 'master' into session-meta

For adjusted CI configuration.

4 years agoAdd templates workflow
Tim Düsterhus [Wed, 21 Oct 2020 10:38:43 +0000 (12:38 +0200)]
Add templates workflow

4 years agoMerge pull request #3619 from WoltLab/54-minimum-requirements
Tim Düsterhus [Wed, 21 Oct 2020 10:39:29 +0000 (12:39 +0200)]
Merge pull request #3619 from WoltLab/54-minimum-requirements

Update minimum requirements

4 years agoDeprecated string offset in Net_IDNA2 (PHP 7.4)
Alexander Ebert [Mon, 27 Jan 2020 15:32:16 +0000 (16:32 +0100)]
Deprecated string offset in Net_IDNA2 (PHP 7.4)

(cherry picked from commit f1d17510cf7d5aa224ad10936ba4529990de127e)

4 years agoUpdate to Guzzle 7.2
Tim Düsterhus [Tue, 20 Oct 2020 15:08:21 +0000 (17:08 +0200)]
Update to Guzzle 7.2

4 years agoUpdate composer dependencies with updated platform
Tim Düsterhus [Tue, 20 Oct 2020 15:06:34 +0000 (17:06 +0200)]
Update composer dependencies with updated platform

4 years agoIncrease minimum MySQL 8 version to 8.0.19
Tim Düsterhus [Tue, 20 Oct 2020 14:56:55 +0000 (16:56 +0200)]
Increase minimum MySQL 8 version to 8.0.19

Limited by: Nothing really. Ubuntu Focal ships with 8.0.21 which was released
in July 2020. While there should be no good reason to not apply these bugfix
upgrades we'll give a bit of leeway and select 8.0.19 which is from January
2020 and thus one year younger than the previous 8.0.14 which is from January
2019.

4 years agoIncrease minimum MySQL 5 version to 5.7.31
Tim Düsterhus [Tue, 20 Oct 2020 14:52:52 +0000 (16:52 +0200)]
Increase minimum MySQL 5 version to 5.7.31

Limited by: Ubuntu Bionic which has 5.7.31-0ubuntu0.18.04.1.

4 years agoIncrease minimum MariaDB version to 10.1.44
Tim Düsterhus [Tue, 20 Oct 2020 14:50:44 +0000 (16:50 +0200)]
Increase minimum MariaDB version to 10.1.44

Limited by: Ubuntu Bionic which has 1:10.1.44-0ubuntu0.18.04.1.

4 years agoIncrease minimum PHP version to 7.2.24
Tim Düsterhus [Tue, 20 Oct 2020 14:46:31 +0000 (16:46 +0200)]
Increase minimum PHP version to 7.2.24

Limited by: Ubuntu Bionic which has 7.2.24-0ubuntu0.18.04.7.

4 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Wed, 21 Oct 2020 10:08:22 +0000 (12:08 +0200)]
Merge branch '5.2' into 5.3

4 years agoMerge pull request #3620 from WoltLab/php-syntax-action
Tim Düsterhus [Wed, 21 Oct 2020 10:07:35 +0000 (12:07 +0200)]
Merge pull request #3620 from WoltLab/php-syntax-action

Add php-syntax workflow

4 years agoPin the setup-php action to v2 instead of 2.7.0
Tim Düsterhus [Wed, 21 Oct 2020 08:40:18 +0000 (10:40 +0200)]
Pin the setup-php action to v2 instead of 2.7.0

4 years agoIgnore errors in HTMLPurifier*.autoload-legacy.php
Tim Düsterhus [Wed, 21 Oct 2020 08:35:20 +0000 (10:35 +0200)]
Ignore errors in HTMLPurifier*.autoload-legacy.php

4 years agoFix PHP 8 syntax in DirectoryUtil
Tim Düsterhus [Wed, 21 Oct 2020 08:33:38 +0000 (10:33 +0200)]
Fix PHP 8 syntax in DirectoryUtil

4 years agoRemove PHP syntax check from Travis CI
Tim Düsterhus [Wed, 21 Oct 2020 08:31:58 +0000 (10:31 +0200)]
Remove PHP syntax check from Travis CI

4 years agoSuppress "No Syntax errors detected" output
Tim Düsterhus [Wed, 21 Oct 2020 08:09:44 +0000 (10:09 +0200)]
Suppress "No Syntax errors detected" output

4 years agoAdd php-syntax problem matcher
Tim Düsterhus [Wed, 21 Oct 2020 07:46:50 +0000 (09:46 +0200)]
Add php-syntax problem matcher

4 years agoAdd php-syntax Workflow
Tim Düsterhus [Wed, 21 Oct 2020 07:38:08 +0000 (09:38 +0200)]
Add php-syntax Workflow

4 years agoDisabled the sticky code box header inside dialogs
Alexander Ebert [Tue, 20 Oct 2020 15:11:40 +0000 (17:11 +0200)]
Disabled the sticky code box header inside dialogs

4 years agoSlightly reduced the horizontal padding of `<kbd>` on smaller screens
Alexander Ebert [Tue, 20 Oct 2020 14:45:21 +0000 (16:45 +0200)]
Slightly reduced the horizontal padding of `<kbd>` on smaller screens

4 years agoMerge pull request #3614 from WoltLab/invalidateMailForm-error
Tim Düsterhus [Tue, 20 Oct 2020 12:08:43 +0000 (14:08 +0200)]
Merge pull request #3614 from WoltLab/invalidateMailForm-error

Do not ignore errors in invalidateMailForm update script

4 years agoFix PHP 8 support in form builder
Tim Düsterhus [Tue, 20 Oct 2020 10:02:22 +0000 (12:02 +0200)]
Fix PHP 8 support in form builder

> Message: Method ReflectionParameter::getClass() is deprecated

Fixes #3489

4 years agoHandle http://ns.adobe.com/xmp/extension/ in ExifUtil
Tim Düsterhus [Tue, 20 Oct 2020 08:56:33 +0000 (10:56 +0200)]
Handle ns.adobe.com/xmp/extension/ in ExifUtil

Resolves #3616

4 years agoImprove readability in CsrfTokenFunctionTemplatePlugin
Tim Düsterhus [Tue, 20 Oct 2020 07:17:02 +0000 (09:17 +0200)]
Improve readability in CsrfTokenFunctionTemplatePlugin

see #3612

Co-authored-by: Matthias Schmidt <gravatronics@live.com>
4 years agoMerge branch '5.2'
Alexander Ebert [Mon, 19 Oct 2020 13:59:12 +0000 (15:59 +0200)]
Merge branch '5.2'

4 years agoRevert "Fix deprecation warnings in form builder in PHP 8"
Alexander Ebert [Mon, 19 Oct 2020 13:58:54 +0000 (15:58 +0200)]
Revert "Fix deprecation warnings in form builder in PHP 8"

This reverts commit 624e3dd0b234c4bab3e537173421045c7c82590c.

4 years agoFix endless loop in removeExifData when the APP1 signature does not match
Tim Düsterhus [Mon, 19 Oct 2020 13:32:05 +0000 (15:32 +0200)]
Fix endless loop in removeExifData when the APP1 signature does not match

4 years agoDo not ignore errors in invalidateMailForm update script
Tim Düsterhus [Mon, 19 Oct 2020 13:09:06 +0000 (15:09 +0200)]
Do not ignore errors in invalidateMailForm update script

Fixes #3613

4 years agoMerge branch '5.2' into master
Tim Düsterhus [Mon, 19 Oct 2020 11:37:12 +0000 (13:37 +0200)]
Merge branch '5.2' into master

4 years agoIgnore symlink creation failures in DebugFolderEmailTransport
Tim Düsterhus [Mon, 19 Oct 2020 11:36:07 +0000 (13:36 +0200)]
Ignore symlink creation failures in DebugFolderEmailTransport

4 years agoMerge pull request #3593 from WoltLab/session-refactor
Tim Düsterhus [Mon, 19 Oct 2020 10:34:15 +0000 (12:34 +0200)]
Merge pull request #3593 from WoltLab/session-refactor

Implement the new session handling

4 years agoRelease 5.3.0 RC 2 5.3.0_RC_2
Alexander Ebert [Sat, 17 Oct 2020 22:47:03 +0000 (00:47 +0200)]
Release 5.3.0 RC 2

4 years agoMerge branch '5.2'
Matthias Schmidt [Sat, 17 Oct 2020 14:37:15 +0000 (16:37 +0200)]
Merge branch '5.2'

4 years agoFix updating action of foreign key
Matthias Schmidt [Sat, 17 Oct 2020 14:36:53 +0000 (16:36 +0200)]
Fix updating action of foreign key

Close #3610

4 years agoUpdating minified JavaScript files
root [Sat, 17 Oct 2020 12:35:39 +0000 (12:35 +0000)]
Updating minified JavaScript files

4 years agoUse the overhauled notification settings in the admin panel
Alexander Ebert [Sat, 17 Oct 2020 12:04:48 +0000 (14:04 +0200)]
Use the overhauled notification settings in the admin panel

4 years agoFix use of the CSRF token in WCFSetup
Tim Düsterhus [Thu, 15 Oct 2020 12:25:23 +0000 (14:25 +0200)]
Fix use of the CSRF token in WCFSetup

4 years agoReduce the size of the session cookie
Tim Düsterhus [Wed, 14 Oct 2020 15:12:57 +0000 (17:12 +0200)]
Reduce the size of the session cookie

Send the raw bytes representing the session ID instead of the hexadecimal
encoding.

4 years agoMake the signed XSRF-TOKEN value raw bytes
Tim Düsterhus [Wed, 14 Oct 2020 15:07:43 +0000 (17:07 +0200)]
Make the signed XSRF-TOKEN value raw bytes

The signed value is already encoded as part of creating the signed string.
There is no need to convert it to a hexadecimal representation first,
unnecessarily bloating the value.

While doing so reduce the number of bytes to 16, generating a 128 bit value
which is plenty for this use case.

4 years agoMove the security token storage into a signed cookie
Tim Düsterhus [Wed, 14 Oct 2020 15:00:59 +0000 (17:00 +0200)]
Move the security token storage into a signed cookie

4 years agoUse new {csrfToken} tag in templates
Tim Düsterhus [Wed, 14 Oct 2020 14:03:48 +0000 (16:03 +0200)]
Use new {csrfToken} tag in templates

4 years agoAdd CsrfTokenCompilerTemplatePlugin
Tim Düsterhus [Wed, 14 Oct 2020 13:55:46 +0000 (15:55 +0200)]
Add CsrfTokenCompilerTemplatePlugin

4 years agoImplement the (parent)?Page* values in SessionHandler::__get()
Tim Düsterhus [Thu, 15 Oct 2020 09:27:43 +0000 (11:27 +0200)]
Implement the (parent)?Page* values in SessionHandler::__get()

And switch the whole method to a large switch statement.

4 years agoMove spiderID out of the environment array
Tim Düsterhus [Wed, 14 Oct 2020 13:47:33 +0000 (15:47 +0200)]
Move spiderID out of the environment array

There is no better replacement as of now.

4 years agoStop accessing the ->lastActivityTime property of the session
Tim Düsterhus [Wed, 14 Oct 2020 12:23:49 +0000 (14:23 +0200)]
Stop accessing the ->lastActivityTime property of the session

Use TIME_NOW instead.

4 years agoStop accessing the ->requestURI/Method properties of the session
Tim Düsterhus [Wed, 14 Oct 2020 12:21:53 +0000 (14:21 +0200)]
Stop accessing the ->requestURI/Method properties of the session

Use UserUtil / $_SERVER instead.

4 years agoStop accessing the ->userAgent property of the session
Tim Düsterhus [Wed, 14 Oct 2020 12:20:02 +0000 (14:20 +0200)]
Stop accessing the ->userAgent property of the session

Use UserUtil::getUserAgent() instead.

4 years agoStop accessing the ->ipAddress property of the session
Tim Düsterhus [Wed, 14 Oct 2020 12:18:53 +0000 (14:18 +0200)]
Stop accessing the ->ipAddress property of the session

Use UserUtil::getIpAddress() instead.

4 years agoDeprecate the 'environment' session variables
Tim Düsterhus [Wed, 14 Oct 2020 12:16:01 +0000 (14:16 +0200)]
Deprecate the 'environment' session variables

4 years agoDrop lastRequestURI and lastRequestMethod
Tim Düsterhus [Wed, 14 Oct 2020 12:10:41 +0000 (14:10 +0200)]
Drop lastRequestURI and lastRequestMethod

They do not appear to be in use and neither are they documented in
property-read of the class documentation.

4 years agoSign the session cookie
Tim Düsterhus [Wed, 14 Oct 2020 09:30:08 +0000 (11:30 +0200)]
Sign the session cookie

4 years agoRequire generation of a valid signature_secret during WCFSetup
Tim Düsterhus [Wed, 14 Oct 2020 09:41:07 +0000 (11:41 +0200)]
Require generation of a valid signature_secret during WCFSetup

4 years agoMove cookie handling into SessionHandler
Tim Düsterhus [Tue, 13 Oct 2020 08:40:35 +0000 (10:40 +0200)]
Move cookie handling into SessionHandler

4 years agoRemove requestURI and requestMethod from wcf1_acp_session
Tim Düsterhus [Mon, 5 Oct 2020 10:14:38 +0000 (12:14 +0200)]
Remove requestURI and requestMethod from wcf1_acp_session

4 years agoRemove legacy session keepAlive from template
Tim Düsterhus [Mon, 5 Oct 2020 10:22:54 +0000 (12:22 +0200)]
Remove legacy session keepAlive from template

Two hours for guests and 14 days for users should be more than reasonable.

4 years agoManage the session timeout automatically
Tim Düsterhus [Mon, 5 Oct 2020 10:11:05 +0000 (12:11 +0200)]
Manage the session timeout automatically

4 years agoMake SessionHandler::keepAlive() a no-op
Tim Düsterhus [Mon, 5 Oct 2020 08:47:05 +0000 (10:47 +0200)]
Make SessionHandler::keepAlive() a no-op

4 years agoFix GDPR export for sessions
Tim Düsterhus [Mon, 5 Oct 2020 09:53:24 +0000 (11:53 +0200)]
Fix GDPR export for sessions

Resolves #3588

4 years agoRemove legacy SID_* constants
Tim Düsterhus [Mon, 5 Oct 2020 09:39:10 +0000 (11:39 +0200)]
Remove legacy SID_* constants

4 years agoDrop sessions if the session variables became corrupted
Tim Düsterhus [Wed, 14 Oct 2020 08:39:35 +0000 (10:39 +0200)]
Drop sessions if the session variables became corrupted

4 years agoReset SessionHandler::variablesChanged after update
Tim Düsterhus [Wed, 14 Oct 2020 08:47:16 +0000 (10:47 +0200)]
Reset SessionHandler::variablesChanged after update

4 years agoUse differing conditions for guests / users when fetching legacy sessions
Tim Düsterhus [Tue, 13 Oct 2020 08:24:08 +0000 (10:24 +0200)]
Use differing conditions for guests / users when fetching legacy sessions

4 years agoDo not refresh ACP session cookies
Tim Düsterhus [Thu, 15 Oct 2020 12:35:59 +0000 (14:35 +0200)]
Do not refresh ACP session cookies

They are scoped as session cookies and thus live until the browser is closed
which is preferable compared to a dated expiry.

4 years agoImplement the new session handling
Tim Düsterhus [Fri, 2 Oct 2020 14:02:49 +0000 (16:02 +0200)]
Implement the new session handling

Unfortunately this can't be sanely split into multiple smaller commits, because
all the methods rely on the correct working of the other methods. A common
issue during testing was the magic SessionHandler::__get() function not
returning the proper data.

4 years agoDeprecated SessionHandler::setCookieSuffix()
Tim Düsterhus [Fri, 2 Oct 2020 13:48:57 +0000 (15:48 +0200)]
Deprecated SessionHandler::setCookieSuffix()

4 years agoAdd wcf1_user_session and update wcf1_acp_session
Tim Düsterhus [Fri, 2 Oct 2020 13:28:49 +0000 (15:28 +0200)]
Add wcf1_user_session and update wcf1_acp_session

4 years agoMake SessionHandler final
Tim Düsterhus [Fri, 2 Oct 2020 13:35:27 +0000 (15:35 +0200)]
Make SessionHandler final

Extending the SessionHandler always was a bit questionable. Going forward the
only supported API for the session system is the public PHP API.

4 years agoMerge branch 'master' into session-meta
Tim Düsterhus [Thu, 15 Oct 2020 14:01:01 +0000 (16:01 +0200)]
Merge branch 'master' into session-meta

4 years agoUse \hash_equals in CryptoUtil::validateSignedString()
Tim Düsterhus [Wed, 14 Oct 2020 09:24:23 +0000 (11:24 +0200)]
Use \hash_equals in CryptoUtil::validateSignedString()

4 years agoMerge pull request #3607 from WoltLab/import-user-group-option-value
Tim Düsterhus [Thu, 15 Oct 2020 10:53:30 +0000 (12:53 +0200)]
Merge pull request #3607 from WoltLab/import-user-group-option-value

Create user group option values during group import

4 years agoMerge branch '5.2' into master
Tim Düsterhus [Thu, 15 Oct 2020 09:31:36 +0000 (11:31 +0200)]
Merge branch '5.2' into master

4 years agoFixed parameter validation of 'captionEnableHtml'
Marcel Werk [Thu, 15 Oct 2020 09:10:50 +0000 (11:10 +0200)]
Fixed parameter validation of 'captionEnableHtml'

4 years agoFix handling of default headers in HttpFactory::makeClient()
Tim Düsterhus [Thu, 15 Oct 2020 08:56:44 +0000 (10:56 +0200)]
Fix handling of default headers in HttpFactory::makeClient()

If a `headers` array is given the default user agent would not be applied, even
if the `user-agent` key is not part of the `headers` that are given. This
caused Guzzle to use its default user agent.

4 years agoCreate user group option values during group import
Tim Düsterhus [Thu, 15 Oct 2020 08:34:56 +0000 (10:34 +0200)]
Create user group option values during group import

Resolves #3534

4 years agoLog NamedUserException to the console when running in debug mode
Alexander Ebert [Wed, 14 Oct 2020 16:47:16 +0000 (18:47 +0200)]
Log NamedUserException to the console when running in debug mode

Closes #3541

4 years agoMerge pull request #3605 from WoltLab/recommend-curl
Tim Düsterhus [Wed, 14 Oct 2020 12:26:09 +0000 (14:26 +0200)]
Merge pull request #3605 from WoltLab/recommend-curl

Recommend cURL during WCFSetup

4 years agoRecommend cURL during WCFSetup
Tim Düsterhus [Wed, 14 Oct 2020 11:41:38 +0000 (13:41 +0200)]
Recommend cURL during WCFSetup

Resolves #3601

4 years agoMerge pull request #3604 from ChristopherWalz/master
Marcel Werk [Wed, 14 Oct 2020 10:25:55 +0000 (12:25 +0200)]
Merge pull request #3604 from ChristopherWalz/master

Add DatabaseObjectList::setConditionBuilder

4 years agoAdd DatabaseObjectList::setConditionBuilder
Christopher Walz [Wed, 14 Oct 2020 10:16:53 +0000 (12:16 +0200)]
Add DatabaseObjectList::setConditionBuilder

4 years agoMerge branch '5.2'
Marcel Werk [Wed, 14 Oct 2020 09:06:37 +0000 (11:06 +0200)]
Merge branch '5.2'

4 years agoAdded link to new manual
Marcel Werk [Wed, 14 Oct 2020 09:06:14 +0000 (11:06 +0200)]
Added link to new manual

4 years agoMerge branch '5.2'
Alexander Ebert [Tue, 13 Oct 2020 16:03:47 +0000 (18:03 +0200)]
Merge branch '5.2'

4 years agoSuppress the edit button for boxes on touch devices
Alexander Ebert [Tue, 13 Oct 2020 16:03:33 +0000 (18:03 +0200)]
Suppress the edit button for boxes on touch devices

The first tap on the box will trigger the hover, preventing any other elements, such as links, from responding.