Skip to content

Commit

Permalink
security: cross-site request forgery
Browse files Browse the repository at this point in the history
  • Loading branch information
HDVinnie committed Sep 23, 2021
1 parent 5dc5263 commit 5b978cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions resources/views/partials/top_nav.blade.php
Expand Up @@ -142,9 +142,14 @@ class="img-circle">
</a>
</li>
<li>
<a href="{{ route('logout') }}">
<i class="{{ config('other.font-awesome') }} fa-sign-out"></i> @lang('auth.logout')
</a>
<form role="form" method="POST" action="{{ route('logout') }}" style="background-color: #272634; clear: both; display: block; font-family: lato,sans-serif; font-weight: 400; line-height: 1.42857; padding: 6px 10px; white-space: nowrap; ">
@csrf
<div class="text-center">
<button type="submit" class="btn btn-xs btn-danger">
<i class='{{ config('other.font-awesome') }} fa-sign-out'></i> @lang('auth.logout')
</button>
</div>
</form>
</li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Expand Up @@ -85,7 +85,7 @@
Route::group(['middleware' => ['auth', 'twostep', 'banned']], function () {

// General
Route::get('/logout', [App\Http\Controllers\Auth\LoginController::class, 'logout'])->name('logout');
Route::post('/logout', [App\Http\Controllers\Auth\LoginController::class, 'logout'])->name('logout');
Route::get('/', [App\Http\Controllers\HomeController::class, 'index'])->name('home.index');

// Achievements System
Expand Down

0 comments on commit 5b978cc

Please sign in to comment.