diff --git a/include/class_CSRFProtection.inc b/include/class_CSRFProtection.inc index cfa60da006b89b6bd43c99f2b87daf1f5e31a343..dec9a5b172ca72d8e9f86a4ffc6881f8a1a377d3 100644 --- a/include/class_CSRFProtection.inc +++ b/include/class_CSRFProtection.inc @@ -26,13 +26,13 @@ class CSRFProtection return; } if (empty($_POST['CSRFtoken'])) { - throw new Exception('CSRF protection token missing'); + throw new FusionDirectoryException('CSRF protection token missing'); } static::checkHeaders(); if ($_POST['CSRFtoken'] !== static::getToken()) { - throw new Exception('CSRF protection token invalid'); + throw new FusionDirectoryException('CSRF protection token invalid'); } } @@ -63,7 +63,7 @@ class CSRFProtection } if ($target) { if (!hash_equals($origin, $target)) { - throw new Exception('CSRF detected: origin and target are not matching ('.$origin.' != '.$target.')'); + throw new FusionDirectoryException('CSRF detected: origin and target are not matching ('.$origin.' != '.$target.')'); } } }