Tim Düsterhus [Wed, 22 Sep 2021 13:08:47 +0000 (15:08 +0200)]
Check whether WCFSetup is accessed using HTTPS
Resolves #4502
Tim Düsterhus [Wed, 22 Sep 2021 12:33:56 +0000 (14:33 +0200)]
Sort neededFilesPattern in install.php
Tim Düsterhus [Wed, 22 Sep 2021 12:28:26 +0000 (14:28 +0200)]
Inline error handler and exception handler in install.php
Tim Düsterhus [Wed, 22 Sep 2021 12:23:35 +0000 (14:23 +0200)]
Synchronize error handling in install.php with core.functions.php
The previous error handling:
a) was buggy. It failed during stack trace printing under certain
circumstances.
b) was outdated with regard to the design.
Tim Düsterhus [Wed, 22 Sep 2021 11:59:54 +0000 (13:59 +0200)]
Avoid the use of $_REQUEST in install.php
Tim Düsterhus [Wed, 22 Sep 2021 11:45:40 +0000 (13:45 +0200)]
Remove useless file_exists() check for composer autoloader in install.php
The autoloader must exist at that point.
Tim Düsterhus [Wed, 22 Sep 2021 10:37:07 +0000 (12:37 +0200)]
Remove unnamespaced IPrintableException from install.php
Tim Düsterhus [Wed, 22 Sep 2021 10:33:58 +0000 (12:33 +0200)]
Clean up `$prefix` generation in install.php
Tim Düsterhus [Wed, 22 Sep 2021 10:33:17 +0000 (12:33 +0200)]
Remove unused methods from BasicFileUtil in install.php
Tim Düsterhus [Wed, 22 Sep 2021 10:30:54 +0000 (12:30 +0200)]
Remove `is_countable` polyfill from install.php
see
a178c052b8ecc5b1306607955702d6acf2ac254e
Tim Düsterhus [Wed, 22 Sep 2021 10:30:10 +0000 (12:30 +0200)]
Remove `escapeString()` from install.php
see
270ed434d4dc8a44862b38715b826f63943bfcb0
Tim Düsterhus [Wed, 22 Sep 2021 10:20:39 +0000 (12:20 +0200)]
Run php-cs-fixer using PHP 8.0
Tim Düsterhus [Wed, 22 Sep 2021 09:05:05 +0000 (11:05 +0200)]
Merge pull request #4507 from WoltLab/polyfill
Use Symfony's PHP polyfills
Tim Düsterhus [Wed, 22 Sep 2021 09:01:41 +0000 (11:01 +0200)]
Merge pull request #4508 from WoltLab/search-index-manager-cleanup
Remove add() and update() from ISearchIndexManager
Tim Düsterhus [Wed, 22 Sep 2021 08:36:53 +0000 (10:36 +0200)]
Remove add() and update() from ISearchIndexManager
These methods are long-deprecated, remove them from the interface to not force
search engine authors to implement these.
It is expected that code consuming the search API uses the `SearchIndexManager`
class instead of directly accessing a specific `*SearchIndexManager`. The
`SearchIndexManager` only uses `->set()` on the underlying actual
`*SearchIndexManager`. Thus no compatibility break is expected.
Tim Düsterhus [Wed, 22 Sep 2021 07:57:33 +0000 (09:57 +0200)]
Satisfy the PHP syntax check in GitHub Actions
The PHP 7.3 polyfill fails for PHP 7.3, because of a duplicate class
declaration. This file is not actually loaded in new PHP versions, thus we can
ignore it.
Tim Düsterhus [Tue, 21 Sep 2021 15:40:15 +0000 (17:40 +0200)]
Remove custom `is_countable` polyfill from core.functions.php
This is provided by symfony/polyfill-php73.
Tim Düsterhus [Tue, 21 Sep 2021 15:39:52 +0000 (17:39 +0200)]
Add symfony/polyfill-php73 and symfony/polyfill-php74
Tim Düsterhus [Tue, 21 Sep 2021 15:39:14 +0000 (17:39 +0200)]
Deprecate the escapeString() helper (#4506)
Developers are strongly encouraged to use prepared statements. If this is not
possible for compatibility reasons, they should use the `->escapeString()`
method directly.
Deprecating the helper ultimately allows cleaning up core.functions.php which
has become a dumping ground for all type of stuff over time.
Co-authored-by: Alexander Ebert <ebert@woltlab.com>
Tim Düsterhus [Tue, 21 Sep 2021 15:11:41 +0000 (17:11 +0200)]
Stop using the `escapeString` helper in MysqlSearchEngine
Tim Düsterhus [Tue, 21 Sep 2021 14:58:37 +0000 (16:58 +0200)]
Merge branch '5.4'
Tim Düsterhus [Tue, 21 Sep 2021 14:58:07 +0000 (16:58 +0200)]
Merge branch '5.3' into 5.4
Tim Düsterhus [Tue, 21 Sep 2021 14:56:26 +0000 (16:56 +0200)]
Merge branch '5.4'
Marcel Werk [Tue, 21 Sep 2021 14:53:14 +0000 (16:53 +0200)]
Merge pull request #4497 from max-m/patch-categoryMultiSelectOptionType
Make `categoryMultiSelectOptionType.tpl` behave like `categoryOptionList.tpl`
Tim Düsterhus [Tue, 21 Sep 2021 14:31:17 +0000 (16:31 +0200)]
Take the array key into account when checking whether an unnamed KEY matches in DatabaseTableChangeProcessor
The reproducer effectively matches
d7f721d6f920d66f75102723b504d89e57a8c9ff, except that the KEY
is unnamed.
Previously the update would silently fail to do anything. Now the update fails
loudly, because it attempts to create another index with an existing name. This
is no different behavior compared to an INDEX collision of two unnamed indices
`(a, b)`, `(a, c)`. The developer will be clearly alerted of this issue and can
take appropriate measures to avoid it, e.g. by using explicit names.
see #4434
Marcel Werk [Tue, 21 Sep 2021 14:38:48 +0000 (16:38 +0200)]
Merge pull request #4504 from WoltLab/notification-cleanup
Increase defaultvalue of user_cleanup_notification_lifetime to 31 days
Alexander Ebert [Tue, 21 Sep 2021 13:23:24 +0000 (15:23 +0200)]
Skip desktop notifications on Android
Notifications are not supported outside of the context of service workers.
See https://community.woltlab.com/thread/292374-chrome-android-failed-to-construct-notification-illegal-constructor/
Tim Düsterhus [Tue, 21 Sep 2021 12:57:28 +0000 (14:57 +0200)]
Increase defaultvalue of user_cleanup_notification_lifetime to 31 days
A notification lifetime of just 2 weeks is insufficient, because it might
easily result in an user losing important notifications over their summer
vacation.
As an example: If a user checks out on a Friday afternoon and checks in on a
Monday morning 2 weeks later, they'll have lost any notifications arriving on
the first weekend weekend. If their vacation is even longer, e.g. due to a
public holiday, they'll also lose non-weekend notifications.
Increase the lifetime to 31 days. This spans a range from a Friday afternoon
until the Monday afternoon 4 weeks later. This should be sufficiently long for
pretty much all types of vacation.
The old default of 14 days dates back to December 2014 in commit
5cdf8c0338381d1c880bd07d46bb7fcbbde09b61.
Tim Düsterhus [Tue, 21 Sep 2021 12:55:00 +0000 (14:55 +0200)]
Increase the minvalue for the user_*_lifetime options to 1 day
A value of 0 is not useful, because deletion is completely unpredictable.
Joshua Rüsweg [Tue, 21 Sep 2021 10:44:18 +0000 (12:44 +0200)]
Merge pull request #4503 from WoltLab/5.5-get-subscribers-helper-method
Add method to get all subscribers of an object
joshuaruesweg [Tue, 21 Sep 2021 09:23:51 +0000 (11:23 +0200)]
Add method to get all subscribers of an object
Tim Düsterhus [Tue, 21 Sep 2021 09:00:35 +0000 (11:00 +0200)]
Merge branch '5.4'
Tim Düsterhus [Tue, 21 Sep 2021 08:59:22 +0000 (10:59 +0200)]
Do not error during validation of TOTP codes if an invalid device is selected
Tim Düsterhus [Tue, 21 Sep 2021 08:55:15 +0000 (10:55 +0200)]
Merge branch '5.4'
Tim Düsterhus [Tue, 21 Sep 2021 08:54:46 +0000 (10:54 +0200)]
Do not pass `null` to `|encodeJS`
This breaks in PHP 8.1.
Tim Düsterhus [Mon, 20 Sep 2021 16:56:59 +0000 (18:56 +0200)]
Enable npm caching for all GitHub Actions jobs
see
1a0841ca4d71142ba6d8adfce914bbaa90c41bb4
Tim Düsterhus [Mon, 20 Sep 2021 16:56:16 +0000 (18:56 +0200)]
Merge branch '5.4'
Tim Düsterhus [Mon, 20 Sep 2021 16:51:04 +0000 (18:51 +0200)]
Fix TypeScript code style
Tim Düsterhus [Mon, 20 Sep 2021 16:50:03 +0000 (18:50 +0200)]
Fix SCSS code style
Tim Düsterhus [Mon, 20 Sep 2021 16:47:42 +0000 (18:47 +0200)]
Use well-specified node.js for Prettier jobs in GitHub Actions
Tim Düsterhus [Mon, 20 Sep 2021 16:44:54 +0000 (18:44 +0200)]
Update GitHub Actions to node.js 16
Alexander Ebert [Mon, 20 Sep 2021 16:25:10 +0000 (18:25 +0200)]
Skip bogus selection changes
Alexander Ebert [Mon, 20 Sep 2021 16:20:28 +0000 (18:20 +0200)]
Skip the check for the caret position if the selection is invalid
Alexander Ebert [Mon, 20 Sep 2021 15:48:46 +0000 (17:48 +0200)]
Merge branch '5.3' into 5.4
Alexander Ebert [Mon, 20 Sep 2021 15:48:31 +0000 (17:48 +0200)]
Incorrect gradient value in Safari
https://community.woltlab.com/thread/292475-mainmenushowprevious-mainmenushownext-safari-farbunterschied-fehler/
Tim Düsterhus [Mon, 20 Sep 2021 15:15:31 +0000 (17:15 +0200)]
Update npm dependencies
Tim Düsterhus [Mon, 20 Sep 2021 14:53:32 +0000 (16:53 +0200)]
Merge branch '5.4'
Tim Düsterhus [Mon, 20 Sep 2021 14:52:58 +0000 (16:52 +0200)]
Fix SCSS code style
Apparently the replacement of 100% by 1 caused the line to be sufficiently
short to rewrap.
Tim Düsterhus [Mon, 20 Sep 2021 14:47:14 +0000 (16:47 +0200)]
Fix use of transparentize() in *.scss
The function expects a unitless number between 0 and 1 as the second parameter.
The updated SCSS compiler in 5.5+ complains about this misuse.
Tim Düsterhus [Mon, 20 Sep 2021 14:35:35 +0000 (16:35 +0200)]
Merge branch '5.4'
Tim Düsterhus [Mon, 20 Sep 2021 14:23:41 +0000 (16:23 +0200)]
Fix return type for SeekableIterator::* implementations
The `mixed` type is not available with our current minimum PHP version, thus
using ReturnTypeWillChange for these.
Tim Düsterhus [Mon, 20 Sep 2021 14:09:45 +0000 (16:09 +0200)]
Update composer dependencies
Tim Düsterhus [Mon, 20 Sep 2021 14:07:25 +0000 (16:07 +0200)]
Update scssphp/scssphp to 1.8.1
This is for PHP 8.1 compatibility.
Tim Düsterhus [Mon, 20 Sep 2021 14:07:04 +0000 (16:07 +0200)]
Merge branch '5.4'
Tim Düsterhus [Mon, 20 Sep 2021 14:01:02 +0000 (16:01 +0200)]
Move scssphp to the WoltLab fork
This is for PHP 8.1 compatibility.
Alexander Ebert [Mon, 20 Sep 2021 13:58:59 +0000 (15:58 +0200)]
Merge branch '5.4' of https://github.com/WoltLab/WCF into 5.4
Alexander Ebert [Mon, 20 Sep 2021 13:58:51 +0000 (15:58 +0200)]
Enable `X-Frame-Options` for the WCFSetup
This has the side effect of suppressing `SameSite=none` for the cookies, which fails on insecure connections because this attribute value is valid for secure cookies only.
Resolves #4499
Follow up for
2a9d48c4badc4de2e0f2d2fc73c3af2bee39cce8
Tim Düsterhus [Mon, 20 Sep 2021 13:48:48 +0000 (15:48 +0200)]
Merge branch '5.4'
Tim Düsterhus [Mon, 20 Sep 2021 13:48:03 +0000 (15:48 +0200)]
Fix return type of `count()` for the remaining classes implementing \Countable
see
3f6b343d10b044ab08d41fec525f69ffe0a95e49
Tim Düsterhus [Mon, 20 Sep 2021 13:44:14 +0000 (15:44 +0200)]
Fix PHP 8.1 compatibility in DatabaseObjectList
> Return type of wcf\data\DatabaseObjectList::count() should either be
> compatible with Countable::count(): int, or the #[ReturnTypeWillChange]
> attribute should be used to temporarily suppress the notice […]
Tim Düsterhus [Mon, 20 Sep 2021 13:36:51 +0000 (15:36 +0200)]
Merge branch '5.4'
Alexander Ebert [Mon, 20 Sep 2021 13:31:54 +0000 (15:31 +0200)]
Enable `X-Frame-Options` for the WCFSetup
This has the side effect of suppressing `SameSite=none` for the cookies, which fails on insecure connections because this attribute value is valid for secure cookies only.
Resolves #4499
Alexander Ebert [Mon, 20 Sep 2021 12:17:50 +0000 (14:17 +0200)]
Skip the default cover photo when rebuilding users
Fixes #4500
Tim Düsterhus [Mon, 20 Sep 2021 11:37:54 +0000 (13:37 +0200)]
Set the XSRF-Token cookie to SameSite=lax
As it turns out, `strict` is too strict for some use cases of the average user,
as it might suppress the cookie when the user researches something while
writing a post and ultimately comes back to the community via an external link.
This request will not have the XSRF-Token cookie attached due to violating the
`strict` policy, resulting in WoltLab Suite sending a fresh cookie in response.
This will then invalidate the token stored in the form where the user is in the
process of writing their post, ultimately resulting in an error message.
The `SameSite` value is meant as a defense in depth measure to protect the user
even if they current token leaked in some way. Reducing the strictness does not
reduce the security in a measurable way.
joshuaruesweg [Mon, 20 Sep 2021 09:55:10 +0000 (11:55 +0200)]
Fix `sprintf` parameter types
Marcel Werk [Fri, 17 Sep 2021 13:23:39 +0000 (15:23 +0200)]
Merge pull request #4498 from WoltLab/5.5-notifications-for-comments-in-subscribed-article-categories
Notification about article comments by subscribing to the category
Marcel Werk [Fri, 17 Sep 2021 12:15:30 +0000 (14:15 +0200)]
Typo
joshuaruesweg [Mon, 13 Sep 2021 09:42:37 +0000 (11:42 +0200)]
Add notification for comments in subscribed article categories
Maximilian Mader [Tue, 14 Sep 2021 16:19:15 +0000 (18:19 +0200)]
Make `categoryMultiSelectOptionType.tpl` behave like `categoryOptionList.tpl`
Currently the `categoryMultiSelectOptionType.tpl` outputs nodes of depth 0 and depth 1,
but article categories for example can be nested deeper than that.
The `categoryOptionList.tpl` as used by the category add forms handles arbitrary nesting levels already,
so I’ve ported the template logic over to the multi select option template.
The maximum nesting depth in the `AbstractCategoryMultiSelectOptionType.class.php` has been changed
to the default value (-1) to allow for infinite nesting depths.
joshuaruesweg [Mon, 13 Sep 2021 08:35:40 +0000 (10:35 +0200)]
Add `$user` parameter to `canRead()` for articles
joshuaruesweg [Mon, 13 Sep 2021 07:48:24 +0000 (09:48 +0200)]
Add `getSubscribedUserIDs()` function for article categories
Alexander Ebert [Sat, 11 Sep 2021 15:07:45 +0000 (17:07 +0200)]
Merge branch '5.4'
Alexander Ebert [Sat, 11 Sep 2021 15:07:28 +0000 (17:07 +0200)]
Merge branch '5.3' into 5.4
Alexander Ebert [Sat, 11 Sep 2021 15:05:59 +0000 (17:05 +0200)]
Merge pull request #4496 from mutec/tagfieldfdp1
fix id of `CustomFormDataProcessor` in `TagFormField`
mutec [Fri, 10 Sep 2021 14:49:57 +0000 (16:49 +0200)]
fix id of `CustomFormDataProcessor` in `TagFormField`
the id was `acl` which seems to be a copy paste-mistake
Alexander Ebert [Thu, 9 Sep 2021 12:35:17 +0000 (14:35 +0200)]
Removed unnecessary type assertions
Alexander Ebert [Thu, 9 Sep 2021 12:19:57 +0000 (14:19 +0200)]
Rebuilt the compiled JavaScript
Alexander Ebert [Thu, 9 Sep 2021 12:19:27 +0000 (14:19 +0200)]
Merge branch '5.4'
Alexander Ebert [Thu, 9 Sep 2021 11:47:17 +0000 (13:47 +0200)]
Incorrect code style
Alexander Ebert [Thu, 9 Sep 2021 11:42:47 +0000 (13:42 +0200)]
Adjusted the `tab_width` for *.css/*.scss
Alexander Ebert [Thu, 9 Sep 2021 11:35:31 +0000 (13:35 +0200)]
Explicitly reduce the indent size of *.css/*.scss
Joshua Rüsweg [Thu, 9 Sep 2021 10:21:24 +0000 (12:21 +0200)]
Merge pull request #4494 from WoltLab/5.5-sql-installation-cleanup
Force overwrite unknown database tables using a known prefix
Alexander Ebert [Thu, 9 Sep 2021 09:59:36 +0000 (11:59 +0200)]
Merge branch '5.4'
Alexander Ebert [Thu, 9 Sep 2021 09:58:15 +0000 (11:58 +0200)]
Merge branch '5.3' into 5.4
Alexander Ebert [Thu, 9 Sep 2021 09:58:00 +0000 (11:58 +0200)]
Merge branch '5.2' into 5.3
Alexander Ebert [Thu, 9 Sep 2021 09:56:06 +0000 (11:56 +0200)]
Merge branch '5.3' into 5.4
Alexander Ebert [Thu, 9 Sep 2021 09:50:40 +0000 (11:50 +0200)]
Merge pull request #4495 from Fabii547/patch-79
Fix writing `runStandalone` attribute to package.xml
Alexander Ebert [Thu, 9 Sep 2021 09:47:02 +0000 (11:47 +0200)]
Merge pull request #4493 from WoltLab/5.3-aclformfieldcleanup
Reset ACL field values within form cleanup
Fabii547 [Thu, 9 Sep 2021 08:28:36 +0000 (10:28 +0200)]
Fix writing `runStandalone` attribute to package.xml
joshuaruesweg [Wed, 8 Sep 2021 14:17:50 +0000 (16:17 +0200)]
Force overwrite unknown database tables using a known prefix
Closes #4410
Alexander Ebert [Wed, 8 Sep 2021 13:38:46 +0000 (15:38 +0200)]
Release 5.4.7
Alexander Ebert [Wed, 8 Sep 2021 12:13:30 +0000 (14:13 +0200)]
Release 5.3.14
Alexander Ebert [Wed, 8 Sep 2021 12:05:13 +0000 (14:05 +0200)]
Incorrect use of spaces for indentation in <5.4
Alexander Ebert [Sun, 8 Aug 2021 09:29:26 +0000 (11:29 +0200)]
Sandbox `foreachVars` in templates
Nesting the same template inside a `foreach` loop that is also accessed inside the nested call will overwrite the values from the outer template due to identical identifiers being used.
The sandbox did not protected `$this->foreachVars` despite being stateful.
See #4431
Fixes #4444
joshuaruesweg [Wed, 8 Sep 2021 11:53:42 +0000 (13:53 +0200)]
Reset ACL field values within form cleanup
joshuaruesweg [Wed, 8 Sep 2021 11:51:29 +0000 (13:51 +0200)]
Remove empty lines
Alexander Ebert [Tue, 7 Sep 2021 21:01:22 +0000 (23:01 +0200)]
Release 5.4.7 RC 2
Alexander Ebert [Tue, 7 Sep 2021 21:00:29 +0000 (23:00 +0200)]
Replaced a hard-wired color value, Safari fix
Alexander Ebert [Tue, 7 Sep 2021 11:33:58 +0000 (13:33 +0200)]
Release 5.4.7 RC 1
Alexander Ebert [Tue, 7 Sep 2021 11:32:43 +0000 (13:32 +0200)]
Merge branch '5.4' of https://github.com/WoltLab/WCF into 5.4