From 7b4f9630b66af563f6ca59f21c463ef881ca8fe2 Mon Sep 17 00:00:00 2001 From: Sushma S Date: Wed, 4 Oct 2023 12:08:03 +0000 Subject: [PATCH] feat:cpass penentration login get to post change --- routes/web.php | 3 ++- src/Http/Controllers/Account/Controller.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 8a5d136d..24f2bf35 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,7 +22,6 @@ 'prefix' => $prefix, 'as' => $as ], function (): void { - Route::get('account/sniff/{id}', 'Account\Controller@sniff'); // Authentication Routes... Route::get('login', 'Auth\LoginController@showLoginForm')->name('login'); Route::post('login', 'Auth\LoginController@login'); @@ -53,6 +52,8 @@ 'prefix' => $prefix, 'as' => $as ], function (): void { + Route::post('account/sniff', 'Account\Controller@sniff'); + Route::get('activate', 'Auth\ActivationController@activate')->name('user.activate'); Route::any('logout', 'Auth\LoginController@logout')->name('logout'); diff --git a/src/Http/Controllers/Account/Controller.php b/src/Http/Controllers/Account/Controller.php index b21e8d9b..d2f373f0 100644 --- a/src/Http/Controllers/Account/Controller.php +++ b/src/Http/Controllers/Account/Controller.php @@ -141,12 +141,13 @@ public function password(): array ]; } - public function sniff(string $key) + public function sniff() { $decrypted = null; session()->forget('sniffed'); session()->forget('sniff'); + $key = $this->post("key"); try { $decrypted = decrypt($key); } catch (DecryptException $e) {