diff --git a/.version b/.version index 50ffc5aa7f..2165f8f9b6 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.0.3 +2.0.4 diff --git a/frontend/src/_services/authentication.service.js b/frontend/src/_services/authentication.service.js index 3c45c03a65..e9a09af656 100644 --- a/frontend/src/_services/authentication.service.js +++ b/frontend/src/_services/authentication.service.js @@ -206,7 +206,10 @@ function resetPassword(params) { function logout() { clearUser(); const loginPath = (window.public_config?.SUB_PATH || '/') + 'login'; - window.location.href = loginPath + `?redirectTo=${window.location.pathname}`; + const pathname = window.public_config?.SUB_PATH + ? window.location.pathname.replace(window.public_config?.SUB_PATH, '') + : window.location.pathname; + window.location.href = loginPath + `?redirectTo=${!(pathname.indexOf('/') === 0) ? '/' : ''}${pathname}`; } function clearUser() { diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index a34ad2c1eb..1227a4aeba 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -348,7 +348,7 @@ button { } .editor-sidebar { - height: 100%; + height: calc(100% - 45px); position: fixed; right: 0; overflow-x: hidden; diff --git a/plugins/packages/graphql/lib/index.ts b/plugins/packages/graphql/lib/index.ts index aa00a583d9..1261c825a9 100644 --- a/plugins/packages/graphql/lib/index.ts +++ b/plugins/packages/graphql/lib/index.ts @@ -25,7 +25,7 @@ export default class GraphqlQueryService implements QueryService { const json = { query, - variables: variables || {}, + variables: variables ? JSON.parse(variables) : {}, }; try { diff --git a/plugins/packages/graphql/lib/types.ts b/plugins/packages/graphql/lib/types.ts index 5abd517ba5..5c2bb728b6 100644 --- a/plugins/packages/graphql/lib/types.ts +++ b/plugins/packages/graphql/lib/types.ts @@ -3,5 +3,5 @@ export type QueryOptions = { operation: string; query: string; headers?: [string, string][]; - variables?: object; + variables?: string; }; diff --git a/server/.version b/server/.version index 50ffc5aa7f..2165f8f9b6 100644 --- a/server/.version +++ b/server/.version @@ -1 +1 @@ -2.0.3 +2.0.4 diff --git a/server/src/modules/auth/query-auth.guard.ts b/server/src/modules/auth/query-auth.guard.ts index ee12df069a..4b8adea79b 100644 --- a/server/src/modules/auth/query-auth.guard.ts +++ b/server/src/modules/auth/query-auth.guard.ts @@ -1,6 +1,7 @@ import { ExecutionContext, Injectable } from '@nestjs/common'; import { AuthGuard } from '@nestjs/passport'; import { DataQueriesService } from '@services/data_queries.service'; +import { maybeSetSubPath } from 'src/helpers/utils.helper'; @Injectable() export class QueryAuthGuard extends AuthGuard('jwt') { @@ -12,7 +13,8 @@ export class QueryAuthGuard extends AuthGuard('jwt') { const request = context.switchToHttp().getRequest(); // unauthenticated users should be able to to run queries of public apps - if (request.route.path === '/api/data_queries/:id/run') { + const apiUrl = maybeSetSubPath('/api/data_queries/:id/run'); + if (request.route.path === apiUrl) { const dataQuery = await this.dataQueriesService.findOne(request.params.id); const app = dataQuery.dataSource.app;