diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 68a748ef9..58b311947 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -12,6 +12,7 @@ use Illuminate\Auth\Access\AuthorizationException; // use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Foundation\Validation\ValidationException; +use Illuminate\Session\TokenMismatchException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Handler extends ExceptionHandler @@ -171,6 +172,8 @@ class Handler extends ExceptionHandler // } else { // return parent::render($request, $e); // } + case $e instanceof TokenMismatchException: + return redirect()->back()->with('fails', \Lang::get('lang.session-expired')); default: return $this->render500($request, $e); } diff --git a/release-notes.txt b/release-notes.txt index 426f49ae7..34cdbeac1 100644 --- a/release-notes.txt +++ b/release-notes.txt @@ -25,8 +25,9 @@ | v1.9.5 (security hot fixt patch2) |===================================================== ## Bug Fixed - Github issue #446 regarding CSRF - Enabled CSRF token verification to prevent CSRF attacks + Prevents execution of backdoor scripts + Prevents users from uploading PHP files into user's profile picture + Handling token mismatch error when the page is opened for too long and session gets expired |===================================================== | v1.9.4 (security hot fixt patch) diff --git a/resources/lang/de/lang.php b/resources/lang/de/lang.php index f7f610765..dba6d0849 100644 --- a/resources/lang/de/lang.php +++ b/resources/lang/de/lang.php @@ -1157,5 +1157,6 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', - + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php index 2cefeee50..e576f8265 100644 --- a/resources/lang/en/lang.php +++ b/resources/lang/en/lang.php @@ -1594,4 +1594,6 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/fr/lang.php b/resources/lang/fr/lang.php index 71d8663ee..e8656a327 100644 --- a/resources/lang/fr/lang.php +++ b/resources/lang/fr/lang.php @@ -1565,5 +1565,7 @@ return [ 'search' => 'Rechercher...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'L\'utilisateur sélectionné est déjà le propriétaire du ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/it/lang.php b/resources/lang/it/lang.php index aa4fc7cc3..087f45769 100644 --- a/resources/lang/it/lang.php +++ b/resources/lang/it/lang.php @@ -1117,4 +1117,6 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/nl/lang.php b/resources/lang/nl/lang.php index 4ab5bce4c..fbf5463fb 100644 --- a/resources/lang/nl/lang.php +++ b/resources/lang/nl/lang.php @@ -1611,4 +1611,6 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/pt/lang.php b/resources/lang/pt/lang.php index 79a0ec520..35727ce30 100644 --- a/resources/lang/pt/lang.php +++ b/resources/lang/pt/lang.php @@ -1556,5 +1556,7 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ]; diff --git a/resources/lang/ru/lang.php b/resources/lang/ru/lang.php index e6a4ae651..0fc6c253d 100644 --- a/resources/lang/ru/lang.php +++ b/resources/lang/ru/lang.php @@ -1065,4 +1065,6 @@ return [ 'search' => 'Search...', //update 21-12-2016 'selected-user-is-already-the-owner' => 'Selected user is already the owner of this ticket.', + //updated 15-5-2017 + 'session-expired' => 'Session expired or invalid, please try again.', ];