From 6e176840c882cfe11152de6350788d74374a54ae Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 15 Aug 2023 18:58:52 +0200 Subject: feat: move csrf validation out of request Signed-off-by: Daniel Kesselberg --- lib/private/EventSourceFactory.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/private/EventSourceFactory.php') diff --git a/lib/private/EventSourceFactory.php b/lib/private/EventSourceFactory.php index 57888b1be4c..ad6abee3cb8 100644 --- a/lib/private/EventSourceFactory.php +++ b/lib/private/EventSourceFactory.php @@ -12,14 +12,19 @@ namespace OC; use OCP\IEventSource; use OCP\IEventSourceFactory; use OCP\IRequest; +use OCP\Security\CSRF\ICsrfValidator; class EventSourceFactory implements IEventSourceFactory { public function __construct( private IRequest $request, + private ICsrfValidator $csrfValidator, ) { } public function create(): IEventSource { - return new EventSource($this->request); + return new EventSource( + $this->request, + $this->csrfValidator, + ); } } -- cgit v1.2.3