From 35543a727a7fd7a61ac788b4ead8a21098ab1b87 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Fri, 21 Dec 2018 09:55:31 +0000 Subject: [PATCH] CSRF : Update the namespace git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4791 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- csrf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/csrf.php b/csrf.php index 8070047..14643e3 100644 --- a/csrf.php +++ b/csrf.php @@ -57,18 +57,18 @@ class csrf return TRUE; if (! isset ($_SESSION["domframework"]["csrf"]["csrf"])) { - throw new Exception (dgettext("domframework", + throw new \Exception (dgettext("domframework", "No previous CSRF token : abort"), 406); } if ($_SESSION["domframework"]["csrf"]["csrf"] !== $tokenFromUser) { - throw new Exception (dgettext("domframework", + throw new \Exception (dgettext("domframework", "Invalid CSRF token provided"), 406); } if (($_SESSION["domframework"]["csrf"]["csrfStart"] + $this->csrfTimeout) < microtime (TRUE)) { - throw new Exception (dgettext("domframework", + throw new \Exception (dgettext("domframework", "Obsolete CSRF token provided"), 406); } return TRUE;