This repository has been archived by the owner on May 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from fogs/master
Bugfix #153: log messages must not contain clear text passwords
- Loading branch information
Showing
3 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace FR3D\LdapBundle\Exception; | ||
|
||
class SanitizingException extends \Exception | ||
{ | ||
protected $actualException; | ||
protected $secret; | ||
|
||
public function __construct($actualException, $secret) | ||
{ | ||
$this->actualException = $actualException; | ||
$this->secret = $secret; | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return str_replace($this->secret, '****', $this->actualException->__toString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters