From 40d5ffa3d0452bf45c50c04908c35d79e649f690 Mon Sep 17 00:00:00 2001 From: Craig Ballinger Date: Thu, 17 Oct 2019 22:15:47 -0400 Subject: [PATCH 1/2] generate a signed url for the redirect --- app/Http/Controllers/SubscribeController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index d59278c1..f1a88069 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -31,6 +31,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\View; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Illuminate\Support\Facades\URL; /** * This is the subscribe controller. @@ -120,7 +121,7 @@ class SubscribeController extends Controller execute(new VerifySubscriberCommand($subscriber)); } - return cachet_redirect('subscribe.manage', $code) + return redirect()->to(URL::signedRoute(cachet_route_generator('subscribe.manage'), ['code' => $code])) ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed'))); } From bc4ebacde7e5be667e02f625c2f840240f69a909 Mon Sep 17 00:00:00 2001 From: Craig Ballinger Date: Thu, 17 Oct 2019 22:23:52 -0400 Subject: [PATCH 2/2] make styleci happy --- app/Http/Controllers/SubscribeController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index f1a88069..f1d36d45 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -28,10 +28,10 @@ use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Config\Repository; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Config; +use Illuminate\Support\Facades\URL; use Illuminate\Support\Facades\View; use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; -use Illuminate\Support\Facades\URL; /** * This is the subscribe controller.