|
@@ -75,7 +75,7 @@ discard block |
|
|
block discarded – undo |
|
75
|
75
|
return $response->withStatus(403); |
|
76
|
76
|
} |
|
77
|
77
|
|
|
78
|
|
- $generator = function ($action = null) use ($request, &$tokens) { |
|
|
78
|
+ $generator = function($action = null) use ($request, &$tokens) { |
|
79
|
79
|
if (empty($action)) { |
|
80
|
80
|
$action = $request->getUri()->getPath(); |
|
81
|
81
|
} |
|
@@ -91,7 +91,7 @@ discard block |
|
|
block discarded – undo |
|
91
|
91
|
|
|
92
|
92
|
$response = $next($request, $response); |
|
93
|
93
|
|
|
94
|
|
- return $this->insertIntoPostForms($response, function ($match) use ($generator) { |
|
|
94
|
+ return $this->insertIntoPostForms($response, function($match) use ($generator) { |
|
95
|
95
|
preg_match('/action=["\']?([^"\'\s]+)["\']?/i', $match[0], $matches); |
|
96
|
96
|
|
|
97
|
97
|
return $match[0].$generator(isset($matches[1]) ? $matches[1] : null); |
Please login to merge, or discard this patch.