Skip to content
Snippets Groups Projects
Unverified Commit a46dbfd9 authored by Ricardo Garim's avatar Ricardo Garim Committed by GitHub
Browse files

regression: allow specific routes to receive query attr (#33691)

parent ce283bf3
No related branches found
No related tags found
No related merge requests found
...@@ -107,8 +107,16 @@ export async function parseJsonQuery(api: PartialThis): Promise<{ ...@@ -107,8 +107,16 @@ export async function parseJsonQuery(api: PartialThis): Promise<{
} }
} }
const allowedRoutes = [
'/api/v1/settings.public',
'/api/v1/directory',
'/api/v1/channels.messages',
'/api/v1/groups.messages',
'/api/v1/dm.messages',
'/api/v1/im.messages',
];
let query: Record<string, any> = {}; let query: Record<string, any> = {};
if (params.query && isUnsafeQueryParamsAllowed) { if (params.query && (isUnsafeQueryParamsAllowed || allowedRoutes.includes(route))) {
apiDeprecationLogger.parameter(route, 'query', '8.0.0', response, messageGenerator); apiDeprecationLogger.parameter(route, 'query', '8.0.0', response, messageGenerator);
try { try {
query = ejson.parse(params.query); query = ejson.parse(params.query);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment