Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for sso access key reading #1469

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions backend/controllers/shared/RTLConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';
const options = { url: '' };
const logger = Logger;
const common = Common;
Expand Down Expand Up @@ -114,7 +114,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/main.89468e89473d89c7.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion frontend/main.ca6488a35864127e.js

This file was deleted.

6 changes: 4 additions & 2 deletions server/controllers/shared/RTLConf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';

const options = { url: '' };
const logger: LoggerService = Logger;
Expand Down Expand Up @@ -116,7 +116,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
}
this.actions.pipe(
takeUntil(this.unSubs[4]),
filter((action) => action.type === RTLActions.FETCH_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
filter((action) => action.type === RTLActions.SET_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
subscribe((action: (any)) => {
if (action.type === RTLActions.SET_APPLICATION_SETTINGS) {
if (!this.sessionService.getItem('token')) {
Expand Down
Loading