Skip to content

Commit ed7d7aa

Browse files
bug #53975 [Cache] explicitly cast boolean SSL stream options (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Cache] explicitly cast boolean SSL stream options | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #53597 | License | MIT Commits ------- fe91122 explicitly cast boolean SSL stream options
2 parents 89d5eb2 + fe91122 commit ed7d7aa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,22 @@ public static function createConnection(string $dsn, array $options = [])
250250
$extra = [
251251
'stream' => $params['ssl'] ?? null,
252252
];
253+
$booleanStreamOptions = [
254+
'allow_self_signed',
255+
'capture_peer_cert',
256+
'capture_peer_cert_chain',
257+
'disable_compression',
258+
'SNI_enabled',
259+
'verify_peer',
260+
'verify_peer_name',
261+
];
262+
263+
foreach ($extra['stream'] ?? [] as $streamOption => $value) {
264+
if (\in_array($streamOption, $booleanStreamOptions, true) && \is_string($value)) {
265+
$extra['stream'][$streamOption] = filter_var($value, \FILTER_VALIDATE_BOOL);
266+
}
267+
}
268+
253269
if (isset($params['auth'])) {
254270
$extra['auth'] = $params['auth'];
255271
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy