summaryrefslogtreecommitdiffstats
path: root/Core/Exception
diff options
context:
space:
mode:
authorJohannes Schmitt <schmittjoh@gmail.com>2011-02-14 18:06:20 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2011-02-14 20:55:06 +0100
commitd3fb2712958c7221ffcc237cf820aa7a3184dd0c (patch)
tree0b3723a87a0b298adbc9cc2a803d06212885e79e /Core/Exception
parent1accc593337aeaf814c203165e5b50521a9a3d22 (diff)
downloadsymfony-security-d3fb2712958c7221ffcc237cf820aa7a3184dd0c.zip
symfony-security-d3fb2712958c7221ffcc237cf820aa7a3184dd0c.tar.gz
symfony-security-d3fb2712958c7221ffcc237cf820aa7a3184dd0c.tar.bz2
[Security] fixes a bug where authentication errors might have leaked confidential information
Diffstat (limited to 'Core/Exception')
-rw-r--r--Core/Exception/AuthenticationException.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/Core/Exception/AuthenticationException.php b/Core/Exception/AuthenticationException.php
index a43b998..f788a5d 100644
--- a/Core/Exception/AuthenticationException.php
+++ b/Core/Exception/AuthenticationException.php
@@ -16,7 +16,7 @@ namespace Symfony\Component\Security\Core\Exception;
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
-class AuthenticationException extends \RuntimeException
+class AuthenticationException extends \RuntimeException implements \Serializable
{
protected $extraInformation;
@@ -36,4 +36,26 @@ class AuthenticationException extends \RuntimeException
{
$this->extraInformation = $extraInformation;
}
+
+ public function serialize()
+ {
+ return serialize(array(
+ $this->extraInformation,
+ $this->code,
+ $this->message,
+ $this->file,
+ $this->line,
+ ));
+ }
+
+ public function unserialize($str)
+ {
+ list(
+ $this->extraInformation,
+ $this->code,
+ $this->message,
+ $this->file,
+ $this->line
+ ) = unserialize($str);
+ }
}