[BUGFIX] Fix link for workspace preview

The absolute link generated for mailings to
workspace editors misses the page id.

The uid has been accidentally removed with
commit for #56359

Resolves: #56375
Releases: 6.2
Change-Id: I521aee2b96c542c27a911ffeab5d9bfffc8b9a46
Reviewed-on: https://review.typo3.org/27893
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Revert "[TASK] Use a 401 header if login is not successful"

This reverts commit 9974f36d2736e21875a76d33a9dd7ceb440a100d.

The 401 header code is used with HTTP based authentication schemes,
based on RFC 2617.

This is not the case here.

Resolves: #55966
Reverts: #51803
Releases: 6.2, 6.1, 6.0, 4.5
Change-Id: I134f0f1d575f3e8d4c37c2af62df8eca3f01f817
Reviewed-on: https://review.typo3.org/27888
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
[BUGFIX] Fix reference to FileListLocalisation.js

FileListLocalisation.js was moved from backend to filelist
with #55810, but it was forgotten to adapt the reference
in InlineElement.

Resolves: #55979
Releases: 6.2
Change-Id: I102ffe25c255f8ac39a49d4022ee3ab73ff1914c
Reviewed-on: https://review.typo3.org/27861
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Frans Saris
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGIFX] Fix Redirect after switch-to-user

The compatibility layer introduced in #55809
causes trouble with the user switch feature.

User switch intentionally redirects to index.php
but the compatibility layer kicks in and redirects
back to the user module, finally leading to an
endless redirect.

This can be resolved by checking for modules which
have been changed and need that compatibility layer.

Resolves: #56364
Releases: 6.2
Change-Id: I74d8c57335af66068383b49dc7d43ea480e631b8
Reviewed-on: https://review.typo3.org/27897
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
Reviewed-by: Oliver Hader
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Filename sorting in filelist is broken

The sorting by filename in the filelist is broken since the
introduction of sys_file_metadata. It tries to sort the file list
by property file. Before sys_file_metadata it couldn't find this
property and sorted by the default value name. But after introduction
of sys_file_metadata it has an property file, his own sys_file uid.

This patch fixes the sorting behaviour when sorting by filename.

Resolves: #56128
Releases: 6.2
Change-Id: Icd25bc2aafed4baafbaa7d9f87ce755fe9e64579
Reviewed-on: https://review.typo3.org/27881
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Frans Saris
Tested-by: Frans Saris
[TASK] Speed up updating the extension list

The process of updating the TER
extension list takes approx 1 minute
because the extension manager needs
to mark all "latest versions". This is done
via a large UPDATE query on fields
without indices, additionally this is done
in PHP and not in SQL with a
simple subselect.

Additionally the SQL file does not set
appropriate indices at all, which is also
done in this patch.

Releases: 6.2
Resolves: #56354
Change-Id: Ic46994fa1b16cce9912950520955185f3f95fe1a
Reviewed-on: https://review.typo3.org/27876
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[CLEANUP] Remove security_level option from Authentications

The option security_level option was deprecated
since 4.7 and can now be removed.

Also do some cleanup in related code.

Releases: 6.2
Resolves: #56256
Change-Id: I48dcb788ca654aea14fb7125128c564fd373b550
Reviewed-on: https://review.typo3.org/27825
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Additional SignalSlot after init in EditDocumentController

Adds a new SignalSlot possibility after the init method call.

Resolves: #56381
Releases: 6.2
Change-Id: I2357f81c40b123a7cd2eef57ef142a9e934dbc35
Reviewed-on: https://review.typo3.org/27896
Reviewed-by: Julian Kleinhans
Tested-by: Julian Kleinhans
Reviewed-by: Tomas Norre Mikkelsen
Reviewed-by: Erik Frister
Reviewed-by: Joh. Feustel
Reviewed-by: Stefan Rotsch
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
[FEATURE] Add API to CSRF protect Ajax calls in Backend

This change adds API to register Ajax ids with
their handler and to get an Ajax URL for
a specific AjaxID.

A token check is added to the ajax.php dispatcher
script. To stay backwards compatible, the token
is only checked, if the AjaxId is registered not
using the new API.

The new API will be used by TYPO3 core in
consecutive changes.

Resolves: #56345
Documentation: #56347
Releases: 6.2
Change-Id: I188a9312b0f4239040e461ba09dc9c8f2b93a68b
Reviewed-on: https://review.typo3.org/27873
Reviewed-by: Wouter Wolters
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Fix GET parameter order in unit tests

The order of GET parameters changed, so we have
to adapt the tests.

Resolves: #56403
Releases: 6.2
Change-Id: I6fb8d231c71fa020677313127d453be3eab500ce
Reviewed-on: https://review.typo3.org/27917
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] Make sure M parameter is first in URL

Although the order of GET parameters in the URL
does not matter, the M parameter should come first
in the URL.

Resolves: #56404
Releases: 6.2
Change-Id: Id79f2f55fff2430ecce8a76bbba526dc7d175b40
Reviewed-on: https://review.typo3.org/27916
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Nicole Cordes
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[SECURITY] Protect core Ajax calls against CSRF

The backend ajax handler that are directly registered
in DefaultConfiguration.php are now CSRF protected
if necessary.

Resolves: #56356
Releases: 6.2
Change-Id: Ia592f7f2b51c20326600b97d2ce10a5e5fdbfde7
Reviewed-on: https://review.typo3.org/27877
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
[BUGFIX] Fix double quotes in ElementBrowser JS

Double quotes must not be used around JS code
created by GeneralUtility::quoteJSvalue()

Resolves: #56406
Releases: 6.2
Change-Id: Ideff0a2ca475dad140a904a770561fa75f4019b9
Reviewed-on: https://review.typo3.org/27924
Reviewed-by: Thomas Sperling
Tested-by: Thomas Sperling
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Adding new records in edit mode broken

It was not possible anymore to use the "add new record" button
in TCA select fields on records with pid > 0.

This patch makes it work again; the redirect to the original page
gets prevented when a pid is set. This was handled the same way
in 4.6 and 6.1.

Change-Id: Iec058818405385efdacaebf5080f339371356810
Resolves: #56248
Related: #54085
Releases: 6.2
Reviewed-on: https://review.typo3.org/27935
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[BUGFIX] @return for TYPO3\CMS\Sv\AuthenticationService::authUser

Adjust the @return documentation of authUser() to match the actual
implementation in
TYPO3\CMS\Core\Authentication\AbstractUserAuthentication

Change-Id: I2d94cdfee6c58de80c7ec2be2b644b5fcd6c9a97
Resolves: #56421
Releases: 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/27931
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[TASK] Use new way to register add wizard

Resolves: #56432
Releases: 6.2
Change-Id: Id78b3182ed6710a09a82ce69bd1f5b72f9e2a3e0
Reviewed-on: https://review.typo3.org/27939
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Use new way to register list wizard

Resolves: #56434
Releases: 6.2
Change-Id: Ia776874ca247b11a769a1c17ee1e6ec65047ac4c
Reviewed-on: https://review.typo3.org/27941
Reviewed-by: Alexander Schnitzler
Tested-by: Alexander Schnitzler
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[TASK] Add IconUtility::getSpriteIconForResource()

With the introduction of FAL the files and folders are
objects and so there is more info than just a name/extension
to determine the right icon. And with file_metadata
you have the possibility to even add more info to
a file (access rights etc).

This patch adds a new method to the IconUtility API for
generating the sprite icon for a resource. There is also
a hook where other extensions can hook in and change
the icon, options and overlays.

Furthermore, all calls in the core are changed to
IconUtility::getSpriteIconForFile where a
File or Folder object was available.

Resolves: #56211
Documentation: #56412
Releases: 6.2
Change-Id: Ifae61dd65d690fffd90c66568e2647ebd403bce5
Reviewed-on: https://review.typo3.org/27790
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Markus Klein
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Do not log with severity 1320177676

Extbase logged a code smell with a severity of 1320177676
instead of 1 ("notice").

Change-Id: If28c2d66713bdedb3094af22f8f7a00a504d995d
Resolves: #56378
Releases: 4.7, 6.0, 6.1, 6.2
Reviewed-on: https://review.typo3.org/27895
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
[BUGFIX] Title field disappears after using addToAllTCAtypes()

Change-Id: Ia7db1d1b3613badc84ca3ee44ce68c154004f135
Resolves: #56080
Releases: 6.2
Reviewed-on: https://review.typo3.org/27702
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel