-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Add HTTPS security check to reports module
Two new interfaces are added which can be implemented by reports and status providers to access the current PSR-7 server request. Change-Id: I280bee3a71d425861af197ef1e907c4f60ff003f Resolves: #84466 Releases: master Reviewed-on: https://review.typo3.org/56349 Reviewed-by: Benjamin Franzke <bfr@qbus.de> Tested-by: Benjamin Franzke <bfr@qbus.de> Reviewed-by: Tobi Kretschmann <tobi@tobishome.de> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com> Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com> Reviewed-by: Jan Helke <typo3@helke.de> Tested-by: Jan Helke <typo3@helke.de> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com>
- Loading branch information
1 parent
8c59bff
commit 2ee2312
Showing
7 changed files
with
189 additions
and
23 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ntation/Changelog/master/Feature-84466-RequestAwareInterfacesAddedToReports.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. include:: ../../Includes.txt | ||
|
||
=========================================================== | ||
Feature: #84466 - Request aware interfaces added to reports | ||
=========================================================== | ||
|
||
See :issue:`84466` | ||
|
||
Description | ||
=========== | ||
|
||
Two new interfaces where added to mark reports and status providers as request aware: | ||
|
||
* :php:`TYPO3\CMS\Reports\RequestAwareReportInterface` (extends :php:`TYPO3\CMS\Reports\ReportInterface`) | ||
* :php:`TYPO3\CMS\Reports\RequestAwareStatusProviderInterface` (extends :php:`TYPO3\CMS\Reports\StatusProviderInterface`) | ||
|
||
Both interfaces allow reports or status providers to receive an optional PSR-7 server | ||
request argument for their respective interface methods: | ||
|
||
* :php:`getReport()` | ||
* :php:`getStatus()` | ||
|
||
|
||
Impact | ||
====== | ||
|
||
Reports and status providers can now cleanly access information from the current server request. | ||
They only need to implement one of the interfaces to get the current server request injected. | ||
|
||
.. index:: Backend, PHP-API, ext:reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
typo3/sysext/reports/Classes/RequestAwareReportInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
namespace TYPO3\CMS\Reports; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use Psr\Http\Message\ServerRequestInterface; | ||
|
||
/** | ||
* Interface for classes which provide a report using information from the current request | ||
*/ | ||
interface RequestAwareReportInterface extends ReportInterface | ||
{ | ||
/** | ||
* Returns the content for a report | ||
* | ||
* @param ServerRequestInterface|null $request the currently handled request | ||
* @return string A reports rendered HTML | ||
*/ | ||
public function getReport(ServerRequestInterface $request = null); | ||
} |
Oops, something went wrong.