mirror of
https://github.com/flarum/core.git
synced 2025-07-21 08:41:17 +02:00
Remove deprecated CSRF wildcard path match
This commit is contained in:
@@ -26,12 +26,8 @@ class CheckCsrfToken implements Middleware
|
||||
|
||||
public function process(Request $request, Handler $handler): Response
|
||||
{
|
||||
$path = $request->getAttribute('originalUri')->getPath();
|
||||
foreach ($this->exemptRoutes as $exemptRoute) {
|
||||
/**
|
||||
* @deprecated path match should be removed in beta 16, only route name match should be supported.
|
||||
*/
|
||||
if ($exemptRoute === $request->getAttribute('routeName') || fnmatch($exemptRoute, $path)) {
|
||||
if ($exemptRoute === $request->getAttribute('routeName')) {
|
||||
return $handler->handle($request);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user