Skip to content

Commit

Permalink
Merge branch '4.4' into 5.2
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nicolas-grekas committed Mar 23, 2021
2 parents 09c5430 + c00da06 commit 6735464
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Validator/RecursiveContextualValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,10 @@ private function validateGenericNode($value, ?object $object, ?string $cacheKey,
return;
}

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

$this->validateObject(
$value,
$propertyPath,
Expand Down

0 comments on commit 6735464

Please sign in to comment.