Skip to content

Commit c442c69

Browse files
committed
fix(videoverification): Remove CSP wildcard for video verification
spreed does it via AddContentSecurityPolicyEvent event by now Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent acddfae commit c442c69

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

apps/files_sharing/lib/Controller/ShareController.php

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
namespace OCA\Files_Sharing\Controller;
99

10-
use OC\Security\CSP\ContentSecurityPolicy;
1110
use OCA\DAV\Connector\Sabre\PublicAuth;
1211
use OCA\FederatedFileSharing\FederatedShareProvider;
1312
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent;
@@ -92,15 +91,7 @@ public function showAuthenticate(): TemplateResponse {
9291

9392
$this->eventDispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($this->share, BeforeTemplateRenderedEvent::SCOPE_PUBLIC_SHARE_AUTH));
9493

95-
$response = new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
96-
if ($this->share->getSendPasswordByTalk()) {
97-
$csp = new ContentSecurityPolicy();
98-
$csp->addAllowedConnectDomain('*');
99-
$csp->addAllowedMediaDomain('blob:');
100-
$response->setContentSecurityPolicy($csp);
101-
}
102-
103-
return $response;
94+
return new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
10495
}
10596

10697
/**
@@ -111,15 +102,7 @@ protected function showAuthFailed(): TemplateResponse {
111102

112103
$this->eventDispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($this->share, BeforeTemplateRenderedEvent::SCOPE_PUBLIC_SHARE_AUTH));
113104

114-
$response = new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
115-
if ($this->share->getSendPasswordByTalk()) {
116-
$csp = new ContentSecurityPolicy();
117-
$csp->addAllowedConnectDomain('*');
118-
$csp->addAllowedMediaDomain('blob:');
119-
$response->setContentSecurityPolicy($csp);
120-
}
121-
122-
return $response;
105+
return new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
123106
}
124107

125108
/**
@@ -130,15 +113,7 @@ protected function showIdentificationResult(bool $success = false): TemplateResp
130113

131114
$this->eventDispatcher->dispatchTyped(new BeforeTemplateRenderedEvent($this->share, BeforeTemplateRenderedEvent::SCOPE_PUBLIC_SHARE_AUTH));
132115

133-
$response = new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
134-
if ($this->share->getSendPasswordByTalk()) {
135-
$csp = new ContentSecurityPolicy();
136-
$csp->addAllowedConnectDomain('*');
137-
$csp->addAllowedMediaDomain('blob:');
138-
$response->setContentSecurityPolicy($csp);
139-
}
140-
141-
return $response;
116+
return new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
142117
}
143118

144119
/**

0 commit comments

Comments
 (0)