Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions lib/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@
use OCP\Share\IShare;

class Constants {
/**
* Constants for API Controllers
*/
public const API_BASE = '/api/{apiVersion}/';
public const API_V3_REQUIREMENTS = [
'apiVersion' => 'v3',
'formId' => '\d+',
'questionId' => '\d+',
'optionId' => '\d+',
'shareId' => '\d+',
'submissionId' => '\d+',
'path' => '.+'
];

/**
* Used AppConfig Keys
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function index(?string $hash = null): TemplateResponse {
*/
#[NoAdminRequired()]
#[NoCSRFRequired()]
#[FrontpageRoute(verb: 'GET', url: '/{hash}/{view}')]
#[FrontpageRoute(verb: 'GET', url: '/{hash}/{view}', requirements: ['hash' => '[a-zA-Z0-9]{16,}'])]
public function views(string $hash): TemplateResponse {
return $this->index($hash);
}
Expand All @@ -96,7 +96,7 @@ public function views(string $hash): TemplateResponse {
#[NoAdminRequired()]
#[NoCSRFRequired()]
#[PublicPage()]
#[FrontpageRoute(verb: 'GET', url: '/{hash}')]
#[FrontpageRoute(verb: 'GET', url: '/{hash}', requirements: ['hash' => '[a-zA-Z0-9]{16,}'])]
public function internalLinkView(string $hash): Response {
$internalView = $this->urlGenerator->linkToRoute('forms.page.views', ['hash' => $hash, 'view' => 'submit']);

Expand All @@ -116,7 +116,7 @@ public function internalLinkView(string $hash): Response {
#[NoAdminRequired()]
#[NoCSRFRequired()]
#[PublicPage()]
#[FrontpageRoute(verb: 'GET', url: '/s/{hash}')]
#[FrontpageRoute(verb: 'GET', url: '/s/{hash}', requirements: ['hash' => '[a-zA-Z0-9]{24,}'])]
public function publicLinkView(string $hash): Response {
try {
$share = $this->shareMapper->findPublicShareByHash($hash);
Expand Down
Loading