Skip to content

Commit 6735464

Browse files
Merge branch '4.4' into 5.2
* 4.4: [Console] minor fix [Validator] Avoid triggering the autoloader for user-input values Hardening Security - Unserialize DumpDataCollector [HttpClient] remove using $http_response_header [Security] Handle properly 'auto' option for remember me cookie security
2 parents 09c5430 + c00da06 commit 6735464

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Validator/RecursiveContextualValidator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,10 @@ private function validateGenericNode($value, ?object $object, ?string $cacheKey,
649649
return;
650650
}
651651

652-
// If the value is a scalar, pass it anyway, because we want
653-
// a NoSuchMetadataException to be thrown in that case
652+
if (!\is_object($value)) {
653+
throw new NoSuchMetadataException(sprintf('Cannot create metadata for non-objects. Got: "%s".', \gettype($value)));
654+
}
655+
654656
$this->validateObject(
655657
$value,
656658
$propertyPath,

0 commit comments

Comments
 (0)