Skip to content

Commit

Permalink
security: cross-site request forgery
Browse files Browse the repository at this point in the history
- huntr bounty
  • Loading branch information
HDVinnie committed Sep 23, 2021
1 parent 49cb0af commit 9d49c53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions resources/views/torrent/torrent.blade.php
Expand Up @@ -691,10 +691,12 @@ class="btn btn-primary btn-xs" role="button">
</button>
</form>
@else
<a href="{{ route('torrent_revokefeature', ['id' => $torrent->id]) }}"
class="btn btn-danger btn-xs" role="button">
<i class="{{ config('other.font-awesome') }} fa-certificate"></i> @lang('torrent.revokefeatured')
</a>
<form role="form" method="POST" action="{{ route('torrent_revokefeature', ['id' => $torrent->id]) }}" style="display: inline-block;">
@csrf
<button type="submit" class="btn btn-xs btn-danger">
<i class='{{ config('other.font-awesome') }} fa-certificate'></i> @lang('torrent.revokefeatured')
</button>
</form>
@endif
</div>
@endif
Expand Down
2 changes: 1 addition & 1 deletion routes/web.php
Expand Up @@ -273,7 +273,7 @@
Route::get('/{id}/bumpTorrent', [App\Http\Controllers\TorrentController::class, 'bumpTorrent'])->name('bumpTorrent');
Route::get('/{id}/torrent_sticky', [App\Http\Controllers\TorrentController::class, 'sticky'])->name('torrent_sticky');
Route::post('/{id}/torrent_feature', [App\Http\Controllers\TorrentController::class, 'grantFeatured'])->name('torrent_feature');
Route::get('/{id}/torrent_revokefeature', [App\Http\Controllers\TorrentController::class, 'revokeFeatured'])->name('torrent_revokefeature');
Route::post('/{id}/torrent_revokefeature', [App\Http\Controllers\TorrentController::class, 'revokeFeatured'])->name('torrent_revokefeature');
Route::get('/{id}/reseed', [App\Http\Controllers\TorrentController::class, 'reseedTorrent'])->name('reseed');
Route::post('/{id}/tip_uploader', [App\Http\Controllers\BonusController::class, 'tipUploader'])->name('tip_uploader');
Route::get('/{id}/freeleech_token', [App\Http\Controllers\TorrentController::class, 'freeleechToken'])->name('freeleech_token');
Expand Down

0 comments on commit 9d49c53

Please sign in to comment.