Skip to content

Commit 07da7f3

Browse files
committed
Adding checks to key input for create/update exercise file link endpoints.
1 parent 4491a69 commit 07da7f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/V1Module/presenters/ExerciseFilesPresenter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ public function checkCreateFileLink(string $id)
502502
)]
503503
#[Post(
504504
"key",
505-
new VString(1, 16),
505+
new VString(1, 16, '/^[-a-zA-Z0-9_]+$/'),
506506
"Internal user-selected identifier of the exercise file link within the exercise",
507507
required: true
508508
)]
@@ -567,7 +567,7 @@ public function checkUpdateFileLink(string $id, string $linkId)
567567
#[Path("linkId", new VUuid(), "of the exercise file link", required: true)]
568568
#[Post(
569569
"key",
570-
new VString(1, 16),
570+
new VString(1, 16, '/^[-a-zA-Z0-9_]+$/'),
571571
"Internal user-selected identifier of the exercise file link within the exercise",
572572
required: false
573573
)]

0 commit comments

Comments
 (0)