aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/EventSourceFactory.php
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2023-08-15 18:58:52 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2024-08-14 15:41:27 +0200
commit6e176840c882cfe11152de6350788d74374a54ae (patch)
tree36c324e1d646051ba36988094fdeb28371e39f1d /lib/private/EventSourceFactory.php
parent0f10cabf2a7ff6652f7b29e81f3682fac941e647 (diff)
downloadnextcloud-server-dept-remove-csrf-dependency-from-request.tar.gz
nextcloud-server-dept-remove-csrf-dependency-from-request.zip
feat: move csrf validation out of requestdept-remove-csrf-dependency-from-request
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib/private/EventSourceFactory.php')
-rw-r--r--lib/private/EventSourceFactory.php7
1 files changed, 6 insertions, 1 deletions
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,
+ );
}
}