Skip to content

Commit 962252d

Browse files
authored
Merge commit from fork
1 parent bfec5b6 commit 962252d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Yii Framework 2 redis extension Change Log
55
------------------------
66

77
- Bug #270: Prevent null parameter on `mb_strlen` to avoid PHP 8.4 implicity nullable types deprecation (tehmaestro)
8+
- Bug CVE-2025-48493: Prevent logging `AUTH` parameters when `YII_DEBUG` is off (samdark)
89

910

1011
2.0.19 February 13, 2025

src/SocketException.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
*/
1616
class SocketException extends Exception
1717
{
18+
public function __construct($message = null, $code = 0, \Exception $previous = null)
19+
{
20+
if (!YII_DEBUG) {
21+
$message = preg_replace('~AUTH \S+ \S+~', 'AUTH *** ***', $message);
22+
}
23+
parent::__construct($message, $code, $previous);
24+
}
25+
1826
/**
1927
* @return string the user-friendly name of this exception
2028
*/

0 commit comments

Comments
 (0)