Loosen restriction on participant IDs
This commit is contained in:
parent
1e909f963f
commit
dd45b75f86
@ -63,7 +63,7 @@ export default {
|
|||||||
|
|
||||||
const expId = url.searchParams.get('expId');
|
const expId = url.searchParams.get('expId');
|
||||||
const participantId = url.searchParams.get('participantId');
|
const participantId = url.searchParams.get('participantId');
|
||||||
const pat = /^[a-zA-Z0-9]{1,64}$/;
|
const pat = /^[a-zA-Z0-9_\-]{1,64}$/;
|
||||||
if (!expId || !participantId || expId.includes('/') || !participantId.match(pat)) {
|
if (!expId || !participantId || expId.includes('/') || !participantId.match(pat)) {
|
||||||
// prevent path traversal
|
// prevent path traversal
|
||||||
return new Response('Invalid parameters', { status: 400, headers: corsHeaders });
|
return new Response('Invalid parameters', { status: 400, headers: corsHeaders });
|
||||||
|
Loading…
Reference in New Issue
Block a user