Skip to content

Commit 0de95ea

Browse files
authored
Merge pull request #2397 from nextcloud/fix/405-ticket-auth
fix(routes): Don't let preflightedCors route eat requests greedily
2 parents 57058a3 + 57c2ab5 commit 0de95ea

2 files changed

Lines changed: 8 additions & 28 deletions

File tree

appinfo/routes.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

lib/Controller/BookmarkController.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ private function toExternalFolderId(int $internal): int {
159159
return $internal;
160160
}
161161

162+
#[Http\Attribute\NoAdminRequired]
163+
#[Http\Attribute\NoCSRFRequired]
164+
#[Http\Attribute\PublicPage]
165+
#[Http\Attribute\FrontpageRoute(verb: 'OPTIONS', url: '/public/rest/v2/{path}', requirements: ['path' => '.+'])]
166+
public function preflightedCors() {
167+
return parent::preflightedCors();
168+
}
169+
162170
/**
163171
* @return JSONResponse
164172
* @throws UnauthenticatedError

0 commit comments

Comments
 (0)