GitHub/WoltLab/WCF.git
3 years agoConvert `Ajax` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 23:28:55 +0000 (01:28 +0200)]
Convert `Ajax` to TypeScript

Moved the interfaces and types into a separate file to prevent a circular dependency.

3 years agoIncorrect access of map values
Alexander Ebert [Fri, 16 Oct 2020 23:28:23 +0000 (01:28 +0200)]
Incorrect access of map values

3 years agoConvert `Ajax/Request` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 16:32:56 +0000 (18:32 +0200)]
Convert `Ajax/Request` to TypeScript

There are two missing components that will later be added.

3 years agoConvert `Timer/Repeating` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 15:24:18 +0000 (17:24 +0200)]
Convert `Timer/Repeating` to TypeScript

3 years agoUse named types for improve readability
Alexander Ebert [Fri, 16 Oct 2020 15:02:52 +0000 (17:02 +0200)]
Use named types for improve readability

3 years agoConvert `Event/Key` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 14:57:29 +0000 (16:57 +0200)]
Convert `Event/Key` to TypeScript

3 years agoConvert `Event/Handler` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 14:22:12 +0000 (16:22 +0200)]
Convert `Event/Handler` to TypeScript

3 years agoConvert `Image/Resizer` to TypeScript
Tim Düsterhus [Fri, 16 Oct 2020 14:16:51 +0000 (16:16 +0200)]
Convert `Image/Resizer` to TypeScript

3 years agoConvert `Image/ExifUtil` to TypeScript
Tim Düsterhus [Fri, 16 Oct 2020 13:49:31 +0000 (15:49 +0200)]
Convert `Image/ExifUtil` to TypeScript

3 years agoConvert `Image/ImageUtil` to TypeScript
Tim Düsterhus [Fri, 16 Oct 2020 13:26:30 +0000 (15:26 +0200)]
Convert `Image/ImageUtil` to TypeScript

3 years agoConvert `Dom/Change/Listener` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 14:08:30 +0000 (16:08 +0200)]
Convert `Dom/Change/Listener` to TypeScript

3 years agoImproved the code to avoid @ts-ignore
Alexander Ebert [Fri, 16 Oct 2020 14:00:44 +0000 (16:00 +0200)]
Improved the code to avoid @ts-ignore

3 years agoConvert `Dom/Traverse` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 13:59:05 +0000 (15:59 +0200)]
Convert `Dom/Traverse` to TypeScript

3 years agoHousekeeping
Alexander Ebert [Fri, 16 Oct 2020 13:00:22 +0000 (15:00 +0200)]
Housekeeping

3 years agoConvert `Ui/Screen` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 12:37:02 +0000 (14:37 +0200)]
Convert `Ui/Screen` to TypeScript

3 years agoConvert `CallbackList` to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 12:36:48 +0000 (14:36 +0200)]
Convert `CallbackList` to TypeScript

3 years agoUse the shorthand function declaration
Alexander Ebert [Fri, 16 Oct 2020 11:14:24 +0000 (13:14 +0200)]
Use the shorthand function declaration

3 years agoUse generic getters for the User module
Alexander Ebert [Fri, 16 Oct 2020 11:05:18 +0000 (13:05 +0200)]
Use generic getters for the User module

3 years agoConverted modules to TypeScript
Alexander Ebert [Fri, 16 Oct 2020 00:02:23 +0000 (02:02 +0200)]
Converted modules to TypeScript

3 years agoConverted additional modules to TypeScript
Alexander Ebert [Thu, 15 Oct 2020 23:13:13 +0000 (01:13 +0200)]
Converted additional modules to TypeScript

3 years agoUpdated the Dictionary implementation
Alexander Ebert [Thu, 15 Oct 2020 17:47:12 +0000 (19:47 +0200)]
Updated the Dictionary implementation

3 years agoAdd global.d.ts and adjust TypeScript target
Tim Düsterhus [Wed, 28 Oct 2020 11:11:33 +0000 (12:11 +0100)]
Add global.d.ts and adjust TypeScript target

3 years agoDo not enforce quotes (Prettier handles it)
Alexander Ebert [Fri, 16 Oct 2020 14:50:32 +0000 (16:50 +0200)]
Do not enforce quotes (Prettier handles it)

3 years agoAdd typescript workflow
Tim Düsterhus [Tue, 27 Oct 2020 09:40:57 +0000 (10:40 +0100)]
Add typescript workflow

3 years agoAdjusted the prototype implementation
Alexander Ebert [Thu, 15 Oct 2020 16:30:42 +0000 (18:30 +0200)]
Adjusted the prototype implementation

3 years agoPoC TypeScript support
Tim Düsterhus [Fri, 21 Aug 2020 10:01:28 +0000 (12:01 +0200)]
PoC TypeScript support

3 years agoAdd initial update instructions from 5.3 to 5.4
Tim Düsterhus [Wed, 28 Oct 2020 09:09:54 +0000 (10:09 +0100)]
Add initial update instructions from 5.3 to 5.4

This includes:

- files, acpTemplates and templates (obvious)
- update_5.4_db.php introduced in #3637
- options adjusted in #3636 and #3637
- objectTypeDefinition introduced in #3633

The database adjustments from #3633 are missing as of right now.

3 years agoMerge pull request #3637 from WoltLab/remove_meta_keywords
Marcel Werk [Wed, 28 Oct 2020 09:05:02 +0000 (10:05 +0100)]
Merge pull request #3637 from WoltLab/remove_meta_keywords

Remove meta keywords

3 years agoMerge branch 'master' into remove_meta_keywords
Tim Düsterhus [Wed, 28 Oct 2020 09:00:46 +0000 (10:00 +0100)]
Merge branch 'master' into remove_meta_keywords

3 years agoMerge branch '5.3'
Matthias Schmidt [Tue, 27 Oct 2020 17:06:50 +0000 (18:06 +0100)]
Merge branch '5.3'

3 years agoHide empty table after deleting last missing language item on page
Matthias Schmidt [Tue, 27 Oct 2020 17:06:36 +0000 (18:06 +0100)]
Hide empty table after deleting last missing language item on page

3 years agoRemove obsolete references to `missingLanguageItems.txt`
Matthias Schmidt [Tue, 27 Oct 2020 17:02:15 +0000 (18:02 +0100)]
Remove obsolete references to `missingLanguageItems.txt`

3 years agoMerge pull request #3627 from WoltLab/composer-deps
Tim Düsterhus [Tue, 27 Oct 2020 13:09:20 +0000 (14:09 +0100)]
Merge pull request #3627 from WoltLab/composer-deps

Update composer dependencies

3 years agoTighten up minimum version of scssphp/scssphp
Tim Düsterhus [Thu, 22 Oct 2020 08:11:14 +0000 (10:11 +0200)]
Tighten up minimum version of scssphp/scssphp

3 years agoUpdate to ezyang/htmlpurifier 4.13.*
Tim Düsterhus [Thu, 22 Oct 2020 08:07:40 +0000 (10:07 +0200)]
Update to ezyang/htmlpurifier 4.13.*

3 years agoMerge branch '5.3'
Tim Düsterhus [Tue, 27 Oct 2020 10:47:37 +0000 (11:47 +0100)]
Merge branch '5.3'

3 years agoFix possible "Invalid parameter number" error in UserStorageHandler
Tim Düsterhus [Tue, 27 Oct 2020 10:46:55 +0000 (11:46 +0100)]
Fix possible "Invalid parameter number" error in UserStorageHandler

3 years agoRemove `Promise` polyfill
Tim Düsterhus [Mon, 19 Oct 2020 09:45:03 +0000 (11:45 +0200)]
Remove `Promise` polyfill

3 years agoMerge branch '5.3'
Tim Düsterhus [Mon, 26 Oct 2020 16:31:39 +0000 (17:31 +0100)]
Merge branch '5.3'

3 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Mon, 26 Oct 2020 16:31:20 +0000 (17:31 +0100)]
Merge branch '5.2' into 5.3

3 years agoMerge pull request #3648 from WoltLab/actions
Tim Düsterhus [Mon, 26 Oct 2020 16:31:08 +0000 (17:31 +0100)]
Merge pull request #3648 from WoltLab/actions

Refactor Workflows

3 years agoAdd javascript workflow
Tim Düsterhus [Mon, 26 Oct 2020 15:53:33 +0000 (16:53 +0100)]
Add javascript workflow

3 years agoRename php-syntax workflow to php
Tim Düsterhus [Mon, 26 Oct 2020 15:53:17 +0000 (16:53 +0100)]
Rename php-syntax workflow to php

3 years agoAdjust human readable name for CodeSniffer check
Tim Düsterhus [Mon, 26 Oct 2020 16:02:03 +0000 (17:02 +0100)]
Adjust human readable name for CodeSniffer check

3 years agoMerge pull request #3636 from WoltLab/remove-gzip
Tim Düsterhus [Mon, 26 Oct 2020 15:30:13 +0000 (16:30 +0100)]
Merge pull request #3636 from WoltLab/remove-gzip

Remove in-application gzip compression

3 years agoRemove in-application gzip compression
Tim Düsterhus [Fri, 23 Oct 2020 14:17:19 +0000 (16:17 +0200)]
Remove in-application gzip compression

Resolves #3634

3 years agoMerge branch '5.3'
Tim Düsterhus [Mon, 26 Oct 2020 15:18:58 +0000 (16:18 +0100)]
Merge branch '5.3'

3 years agoMerge pull request #3646 from WoltLab/user-storage-refactor
Alexander Ebert [Mon, 26 Oct 2020 14:48:46 +0000 (15:48 +0100)]
Merge pull request #3646 from WoltLab/user-storage-refactor

Clean up user storage update logic

3 years agoClean up user storage update logic
Tim Düsterhus [Fri, 23 Oct 2020 10:33:15 +0000 (12:33 +0200)]
Clean up user storage update logic

This commit attempts to reduce the lock contention during user storage
shutdown. The user storage is a constant source of deadlocks and the update
logic grew increasingly ugly over the years in attempts to fix this.

While the previous situation was acceptable in that errors did not surface due
to the automated retries it still trashed any useful information within `SHOW
ENGINE InnoDB STATUS`, making debugging other deadlocks unnecessarily hard.

The new updating logic uses a single `log` array, indexed by user and field.
`null` values indicate a reset, non-`null` values are an update.

When shutting the user storage down the database will be updated with one
transaction per user, ensuring a consistent view for that user. In most
requests it is expected that only a single user (the current one) is being
updated anyway. Before actually performing the updates the row in wcf1_user for
that user is locked using a SELECT FOR UPDATE query. This should cause
concurrent requests to wait at the `SELECT`, which hopefully stops them from
obtaining any locks that the later DELETE / INSERT will need.

Just locking the `wcf1_user_storage` will not work as the lock cannot be
grabbed atomically. Instead MySQL locks all the matching rows one-by-one.
Locking the user is not ideal, but the update of the user storage should happen
pretty quickly which makes it acceptable.

3 years agoSelect correct identifier in FloodControl::countGuestContent()
Tim Düsterhus [Mon, 26 Oct 2020 11:13:25 +0000 (12:13 +0100)]
Select correct identifier in FloodControl::countGuestContent()

see https://github.com/WoltLab/WCF/pull/3633/files#r511879902

3 years agoRemove deletion of options that were removed in 5.3
Tim Düsterhus [Mon, 26 Oct 2020 10:03:55 +0000 (11:03 +0100)]
Remove deletion of options that were removed in 5.3

3 years agoMerge branch '5.3'
joshuaruesweg [Sat, 24 Oct 2020 13:53:34 +0000 (15:53 +0200)]
Merge branch '5.3'

3 years agoMerge branch '5.2' into 5.3
joshuaruesweg [Sat, 24 Oct 2020 13:52:10 +0000 (15:52 +0200)]
Merge branch '5.2' into 5.3

3 years agoMerge pull request #3644 from Krymonota/patch-14
Joshua Rüsweg [Sat, 24 Oct 2020 13:28:59 +0000 (15:28 +0200)]
Merge pull request #3644 from Krymonota/patch-14

Add like support check to comment responses

3 years agoAdd like support check to comment responses
Niklas [Sat, 24 Oct 2020 12:12:15 +0000 (14:12 +0200)]
Add like support check to comment responses

If the provided comment manager doesn't support likes, it's not possible to like comments, as can be seen here:

- https://github.com/WoltLab/WCF/blob/6747fe291c584d7c8295912f8d94297588d142b2/com.woltlab.wcf/templates/commentList.tpl#L59
- https://github.com/WoltLab/WCF/blob/6747fe291c584d7c8295912f8d94297588d142b2/com.woltlab.wcf/templates/commentList.tpl#L59

However, it's never checked for comment responses whether the comment manager supports likes. This results in the like button being displayed for comment responses, even though likes aren't supported.

3 years agoMerge pull request #3633 from WoltLab/flood_control
Matthias Schmidt [Fri, 23 Oct 2020 15:39:21 +0000 (17:39 +0200)]
Merge pull request #3633 from WoltLab/flood_control

Add flood control API

3 years agoUnify flood control method descriptions
Matthias Schmidt [Fri, 23 Oct 2020 15:38:39 +0000 (17:38 +0200)]
Unify flood control method descriptions

3 years agoRemove foreign key in flood control database table
Matthias Schmidt [Fri, 23 Oct 2020 15:28:17 +0000 (17:28 +0200)]
Remove foreign key in flood control database table

3 years agoRelease 5.3.0 RC 3
Alexander Ebert [Fri, 23 Oct 2020 15:11:49 +0000 (17:11 +0200)]
Release 5.3.0 RC 3

3 years agoMerge branch 'remove_meta_keywords' of github.com:WoltLab/WCF into remove_meta_keywords
Matthias Schmidt [Fri, 23 Oct 2020 15:02:41 +0000 (17:02 +0200)]
Merge branch 'remove_meta_keywords' of github.com:WoltLab/WCF into remove_meta_keywords

3 years agoAdd update script to remove `wcf1_page_content.metaKeywords`
Matthias Schmidt [Fri, 23 Oct 2020 14:57:32 +0000 (16:57 +0200)]
Add update script to remove `wcf1_page_content.metaKeywords`

3 years agoUse PHPDoc to mark template variable as deprecated
Matthias Schmidt [Fri, 23 Oct 2020 14:50:46 +0000 (16:50 +0200)]
Use PHPDoc to mark template variable as deprecated

Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
3 years agoUnify phrasing of FloodControl method documentation
Matthias Schmidt [Fri, 23 Oct 2020 14:48:03 +0000 (16:48 +0200)]
Unify phrasing of FloodControl method documentation

3 years agoImprove query performance in FloodControl::getLastTimeByIdentifier()
Matthias Schmidt [Fri, 23 Oct 2020 14:45:30 +0000 (16:45 +0200)]
Improve query performance in FloodControl::getLastTimeByIdentifier()

3 years agoUpdate flood control method description
Matthias Schmidt [Fri, 23 Oct 2020 14:32:09 +0000 (16:32 +0200)]
Update flood control method description

3 years agoUse WCF_UUID and class name if flood control identifier prefix
Matthias Schmidt [Fri, 23 Oct 2020 13:47:18 +0000 (15:47 +0200)]
Use WCF_UUID and class name if flood control identifier prefix

3 years agoUse half-open interval when counting flood control entries
Matthias Schmidt [Fri, 23 Oct 2020 13:32:14 +0000 (15:32 +0200)]
Use half-open interval when counting flood control entries

3 years agoMake FloodControl a final class
Matthias Schmidt [Fri, 23 Oct 2020 13:26:42 +0000 (15:26 +0200)]
Make FloodControl a final class

3 years agoChange FloodControl::PRUNE_TIME visability to private
Matthias Schmidt [Fri, 23 Oct 2020 13:25:05 +0000 (15:25 +0200)]
Change FloodControl::PRUNE_TIME visability to private

Co-authored-by: Tim Düsterhus <duesterhus@woltlab.com>
3 years agoCleanup old flood control entries in daily cronjob
Matthias Schmidt [Fri, 23 Oct 2020 12:57:43 +0000 (14:57 +0200)]
Cleanup old flood control entries in daily cronjob

3 years agoAdd flood control methods to get last content creation time
Matthias Schmidt [Fri, 23 Oct 2020 12:56:31 +0000 (14:56 +0200)]
Add flood control methods to get last content creation time

3 years agoAdd flood control methods to count contents in certain period of time
Matthias Schmidt [Fri, 23 Oct 2020 12:54:32 +0000 (14:54 +0200)]
Add flood control methods to count contents in certain period of time

3 years agoAdd flood control methods to register new content
Matthias Schmidt [Fri, 23 Oct 2020 12:53:28 +0000 (14:53 +0200)]
Add flood control methods to register new content

3 years agoAdd flood control database table
Matthias Schmidt [Fri, 23 Oct 2020 12:51:10 +0000 (14:51 +0200)]
Add flood control database table

3 years agoAdd flood control content object type
Matthias Schmidt [Fri, 23 Oct 2020 12:49:09 +0000 (14:49 +0200)]
Add flood control content object type

3 years agoRemove CMS page meta keywords
Matthias Schmidt [Fri, 23 Oct 2020 14:23:27 +0000 (16:23 +0200)]
Remove CMS page meta keywords

3 years agoRemove meta keywords from page importer
Matthias Schmidt [Fri, 23 Oct 2020 14:15:55 +0000 (16:15 +0200)]
Remove meta keywords from page importer

3 years agoRemove metaKeywords from page PIP
Matthias Schmidt [Fri, 23 Oct 2020 14:15:14 +0000 (16:15 +0200)]
Remove metaKeywords from page PIP

3 years agoRemove meta keywords option
Matthias Schmidt [Fri, 23 Oct 2020 14:12:18 +0000 (16:12 +0200)]
Remove meta keywords option

3 years agoMerge pull request #3573 from WoltLab/session-meta
Tim Düsterhus [Fri, 23 Oct 2020 13:08:44 +0000 (15:08 +0200)]
Merge pull request #3573 from WoltLab/session-meta

Refactor Session Handling: Integration branch

3 years agoMerge branch '5.3'
Tim Düsterhus [Fri, 23 Oct 2020 12:48:58 +0000 (14:48 +0200)]
Merge branch '5.3'

3 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Fri, 23 Oct 2020 12:48:41 +0000 (14:48 +0200)]
Merge branch '5.2' into 5.3

3 years agoMerge pull request #3612 from WoltLab/csrf-token-template-backport
Tim Düsterhus [Fri, 23 Oct 2020 12:47:06 +0000 (14:47 +0200)]
Merge pull request #3612 from WoltLab/csrf-token-template-backport

Backport CsrfTokenFunctionTemplatePlugin

3 years agoMerge pull request #3626 from WoltLab/php7.0-compatibility
Tim Düsterhus [Fri, 23 Oct 2020 12:46:18 +0000 (14:46 +0200)]
Merge pull request #3626 from WoltLab/php7.0-compatibility

Remove PHP 7.0 compatibility code for Reflection

3 years agoRe-add removed template variables relating to legacy auto login in LoginForm
Tim Düsterhus [Fri, 23 Oct 2020 12:33:50 +0000 (14:33 +0200)]
Re-add removed template variables relating to legacy auto login in LoginForm

3 years agoFix formatting in session refactoring (round 2)
Tim Düsterhus [Fri, 23 Oct 2020 12:33:09 +0000 (14:33 +0200)]
Fix formatting in session refactoring (round 2)

3 years agoFix formatting in session refactoring
Tim Düsterhus [Fri, 23 Oct 2020 12:20:48 +0000 (14:20 +0200)]
Fix formatting in session refactoring

Co-authored-by: Matthias Schmidt <gravatronics@live.com>
3 years agoMerge pull request #3630 from WoltLab/database-table-util
Tim Düsterhus [Fri, 23 Oct 2020 11:47:58 +0000 (13:47 +0200)]
Merge pull request #3630 from WoltLab/database-table-util

Remove DatabaseTableUtil

3 years agoMerge pull request #3624 from WoltLab/deprecate_fileutil_downloadfilefromhttp
Tim Düsterhus [Fri, 23 Oct 2020 11:35:47 +0000 (13:35 +0200)]
Merge pull request #3624 from WoltLab/deprecate_fileutil_downloadfilefromhttp

Use Guzzle instead of FileUtil::downloadFileFromHttp

3 years agoUse Guzzle to download spider list
joshuaruesweg [Wed, 21 Oct 2020 17:22:21 +0000 (19:22 +0200)]
Use Guzzle to download spider list

3 years agoUse Guzzle to download package archives
joshuaruesweg [Wed, 21 Oct 2020 17:10:42 +0000 (19:10 +0200)]
Use Guzzle to download package archives

3 years agoUse Guzzle to test the Gravatar URL
joshuaruesweg [Wed, 21 Oct 2020 15:34:16 +0000 (17:34 +0200)]
Use Guzzle to test the Gravatar URL

3 years agoMerge branch '5.3'
Tim Düsterhus [Fri, 23 Oct 2020 10:50:42 +0000 (12:50 +0200)]
Merge branch '5.3'

3 years agoMerge branch '5.2' into 5.3
Tim Düsterhus [Fri, 23 Oct 2020 10:50:23 +0000 (12:50 +0200)]
Merge branch '5.2' into 5.3

3 years agoWhitelist `get_class` in enterprise mode
Tim Düsterhus [Fri, 23 Oct 2020 10:49:54 +0000 (12:49 +0200)]
Whitelist `get_class` in enterprise mode

3 years agoMerge pull request #3631 from WoltLab/header-cleanup
Tim Düsterhus [Fri, 23 Oct 2020 10:41:26 +0000 (12:41 +0200)]
Merge pull request #3631 from WoltLab/header-cleanup

Clean up response headers

3 years agoRemove `Expires` response header
Tim Düsterhus [Fri, 23 Oct 2020 07:43:14 +0000 (09:43 +0200)]
Remove `Expires` response header

No RFC compliant user-agent will ever take this header into account:

> If a response includes a Cache-Control field with the max-age
> directive (Section 5.2.2.8), a recipient MUST ignore the Expires
> field.

3 years agoRemove `Pragma: no-cache` response header
Tim Düsterhus [Fri, 23 Oct 2020 07:38:57 +0000 (09:38 +0200)]
Remove `Pragma: no-cache` response header

`Pragma: no-cache` is HTTP/1.0 specific. Anything accessing WoltLab Suite
should be able to at least speak HTTP/1.1. HTTP/1.0 does not even define the
`Host` header for hosting multiple sites on a single IP address!

3 years agoRemove `X-UA-Compatible` response header
Tim Düsterhus [Fri, 23 Oct 2020 07:37:06 +0000 (09:37 +0200)]
Remove `X-UA-Compatible` response header

Without support for Internet Explorer we no longer need this header.

3 years agoRemove DatabaseTableUtil
Tim Düsterhus [Fri, 23 Oct 2020 07:35:19 +0000 (09:35 +0200)]
Remove DatabaseTableUtil

The only method in there was required for a 5.2.x bugfix update. It should be
possible to safely remove this for 5.4.