Skip to content

Commit d2a6e4c

Browse files
committed
TASK: 8.1 upmerges
2 parents 1106fb5 + 294be96 commit d2a6e4c

File tree

7 files changed

+21
-17
lines changed

7 files changed

+21
-17
lines changed

Neos.Flow/Classes/Core/Booting/Scripts.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@ protected static function ensureCLISubrequestsUseCurrentlyRunningPhpBinary($phpB
856856
$command[] = '2>&1'; // Output errors in response
857857

858858
// Try to resolve which binary file PHP is pointing to
859+
$output = [];
859860
exec(join(' ', $command), $output, $result);
860861

861862
if ($result === 0 && count($output) === 1) {
@@ -878,6 +879,7 @@ protected static function ensureCLISubrequestsUseCurrentlyRunningPhpBinary($phpB
878879
$realPhpBinary = @realpath(PHP_BINARY);
879880
if ($realPhpBinary === false) {
880881
// bypass with exec open_basedir restriction
882+
$output = [];
881883
exec(PHP_BINARY . ' -r "echo realpath(PHP_BINARY);"', $output);
882884
$realPhpBinary = $output[0];
883885
}

Neos.Flow/Classes/Mvc/Controller/ActionController.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
use Neos\Flow\Property\Exception\TargetNotFoundException;
3232
use Neos\Flow\Property\TypeConverter\Error\TargetNotFoundError;
3333
use Neos\Flow\Reflection\ReflectionService;
34-
use Neos\Flow\Security\Exception\InvalidArgumentForHashGenerationException;
35-
use Neos\Flow\Security\Exception\InvalidHashException;
3634
use Neos\Utility\TypeHandling;
3735
use Psr\Http\Message\ResponseInterface;
3836
use Psr\Http\Message\StreamInterface;
@@ -227,13 +225,8 @@ public function processRequest(ActionRequest $request, ActionResponse $response)
227225
if (method_exists($this, $actionInitializationMethodName)) {
228226
call_user_func([$this, $actionInitializationMethodName]);
229227
}
230-
try {
231-
$this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($this->request, $this->arguments);
232-
} catch (InvalidArgumentForHashGenerationException|InvalidHashException $e) {
233-
$message = $this->throwableStorage->logThrowable($e);
234-
$this->logger->notice('Property mapping configuration failed due to HMAC errors. ' . $message, LogEnvironment::fromMethodName(__METHOD__));
235-
$this->throwStatus(400, null, 'Invalid HMAC submitted');
236-
}
228+
229+
$this->mvcPropertyMappingConfigurationService->initializePropertyMappingConfigurationFromRequest($this->request, $this->arguments);
237230

238231
try {
239232
$this->mapRequestArgumentsToControllerArguments();

Neos.Flow/Classes/Mvc/Controller/Arguments.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ public function offsetUnset($offset): void
7878
parent::offsetUnset($translatedOffset);
7979

8080
unset($this->argumentNames[$translatedOffset]);
81-
if ($offset != $translatedOffset) {
82-
unset($this->argumentShortNames[$offset]);
83-
}
8481
}
8582

8683
/**

Neos.Flow/Configuration/Development/Settings.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ Neos:
2323
defaultRenderingOptions:
2424
renderTechnicalDetails: true
2525

26+
renderingGroups:
27+
noStacktraceExceptionGroup:
28+
options:
29+
logException: true
30+
2631
errorHandler:
2732
exceptionalErrors: ['%E_USER_ERROR%', '%E_RECOVERABLE_ERROR%', '%E_WARNING%', '%E_NOTICE%', '%E_USER_WARNING%', '%E_USER_NOTICE%', '%E_STRICT%']
2833

Neos.Flow/Configuration/Settings.Error.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Neos:
3939
variables:
4040
errorDescription: 'Sorry, the database connection couldn''t be established.'
4141

42+
noStacktraceExceptionGroup:
43+
matchingExceptionClassNames: ['Neos\Flow\Security\Exception\InvalidHashException']
44+
options:
45+
logException: false
46+
templatePathAndFilename: 'resource://Neos.Flow/Private/Templates/Error/Default.html'
47+
variables:
48+
errorDescription: 'Sorry, something went wrong.'
49+
4250
errorHandler:
4351

4452
# Defines which errors should result in an exception thrown - all other error
@@ -73,4 +81,3 @@ Neos:
7381

7482
# Maximal recursion for the debugger
7583
recursionLimit: 5
76-

Neos.Flow/Configuration/Settings.Log.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Neos:
5858
optionsByImplementation:
5959
'Neos\Flow\Log\ThrowableStorage\FileStorage':
6060
storagePath: '%FLOW_PATH_DATA%Logs/Exceptions'
61-
# The maximum age of throwable dump in seconds, 0 to disable cleaning based on age, default 30 days
61+
# The maximum age of throwable dump in seconds, 0 to disable cleaning based on age
6262
maximumThrowableDumpAge: 0
63-
# The maximum number of throwable dumps to store, 0 to disable cleaning based on count, default 10.000
63+
# The maximum number of throwable dumps to store, 0 to disable cleaning based on count
6464
maximumThrowableDumpCount: 0

Neos.Flow/Documentation/TheDefinitiveGuide/PartIII/Http.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ that defines the ``process($request, $next)`` method::
135135
*/
136136
final class SomeMiddleware implements MiddlewareInterface
137137
{
138-
public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface;
139-
$response = $next->handle($httpRequest);
138+
public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface {
139+
$response = $next->handle($request);
140140
return $response->withAddedHeader('X-MyHeader', '123');
141141
}
142142
}

0 commit comments

Comments
 (0)