mirror of
https://github.com/directus/directus.git
synced 2026-01-23 10:18:03 -05:00
@@ -37,7 +37,7 @@ export function sanitizeQuery(
|
||||
query.page = sanitizePage(rawQuery.page);
|
||||
}
|
||||
|
||||
if (rawQuery.single) {
|
||||
if (rawQuery.single || rawQuery.single === '') {
|
||||
query.single = sanitizeSingle(rawQuery.single);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,11 @@ function sanitizePage(rawPage: any) {
|
||||
}
|
||||
|
||||
function sanitizeSingle(rawSingle: any) {
|
||||
return true;
|
||||
if (rawSingle !== undefined && rawSingle !== null && ['', 'true', 1, '1'].includes(rawSingle)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sanitizeMeta(rawMeta: any) {
|
||||
|
||||
Reference in New Issue
Block a user