File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
lib/internal/Magento/Framework/App/Action Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
namespace Magento \Framework \App \Action ;
9
9
10
+ use Magento \Framework \App \CsrfAwareActionInterface ;
10
11
use Magento \Framework \App \RequestInterface ;
12
+ use Magento \Framework \App \Request \InvalidRequestException ;
11
13
use Magento \Framework \App \ResponseInterface ;
12
14
13
15
/**
14
16
* Forward request further.
15
17
*
16
18
* @SuppressWarnings(PHPMD.AllPurposeAction)
17
19
*/
18
- class Forward extends AbstractAction
20
+ class Forward extends AbstractAction implements CsrfAwareActionInterface
19
21
{
20
22
/**
21
23
* @param RequestInterface $request
@@ -35,4 +37,21 @@ public function execute()
35
37
$ this ->_request ->setDispatched (false );
36
38
return $ this ->_response ;
37
39
}
40
+
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ public function createCsrfValidationException (RequestInterface $ request ): ?InvalidRequestException
45
+ {
46
+ return new InvalidRequestException ($ this ->_response );
47
+ }
48
+
49
+ /**
50
+ * @inheritDoc
51
+ */
52
+ public function validateForCsrf (RequestInterface $ request ): ?bool
53
+ {
54
+ // This exists so that we can forward to the noroute action in the admin
55
+ return true ;
56
+ }
38
57
}
You can’t perform that action at this time.
0 commit comments