Skip to content

Commit d2b3b7a

Browse files
committed
chore: support Nextcloud 34
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
1 parent 0370499 commit d2b3b7a

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The official whiteboard app for Nextcloud. It allows users to create and share w
4040
<screenshot>https://raw.githubusercontent.com/nextcloud/whiteboard/main/screenshots/screenshot1.png</screenshot>
4141

4242
<dependencies>
43-
<nextcloud min-version="28" max-version="33"/>
43+
<nextcloud min-version="28" max-version="34"/>
4444
</dependencies>
4545

4646
<settings>

lib/Controller/RecordingController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ private function initializeRecordingState(int $fileId, string $jwt): void {
163163

164164
private function createRecordingResponse(): PublicTemplateResponse {
165165
$csp = new ContentSecurityPolicy();
166-
$csp->allowEvalScript();
167166

168167
$response = new PublicTemplateResponse($this->appName, 'recording');
169168
$response->setFooterVisible();

lib/Service/File/GetFileFromPublicSharingTokenService.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use InvalidArgumentException;
1313
use OCP\Constants;
1414
use OCP\Files\File;
15+
use OCP\Files\Folder;
1516
use OCP\Files\NotFoundException;
1617
use OCP\Share\Exceptions\ShareNotFound;
1718
use OCP\Share\IManager as ShareManager;
@@ -51,6 +52,10 @@ public function getFile(): File {
5152
return $node;
5253
}
5354

55+
if (!$node instanceof Folder) {
56+
throw new InvalidArgumentException('No proper share data');
57+
}
58+
5459
$node = $node->getFirstNodeById($this->fileId);
5560

5661
if ($node instanceof File) {

lib/Settings/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getForm(): TemplateResponse {
3232
'whiteboard',
3333
'admin',
3434
[],
35-
'blank'
35+
TemplateResponse::RENDER_AS_BLANK
3636
);
3737
$csp = new ContentSecurityPolicy();
3838
$csp->addAllowedConnectDomain('*');

lib/Settings/Personal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function getForm(): TemplateResponse {
3737
'whiteboard',
3838
'personal',
3939
[],
40-
'blank'
40+
TemplateResponse::RENDER_AS_BLANK
4141
);
4242
$csp = new ContentSecurityPolicy();
4343
$csp->addAllowedConnectDomain('*');

0 commit comments

Comments
 (0)