mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
Fix for sso access key reading (#1469)
This commit is contained in:
parent
006b013cf8
commit
faf27881f5
@ -8,7 +8,7 @@ import { Database } from '../../utils/database.js';
|
|||||||
import { Logger } from '../../utils/logger.js';
|
import { Logger } from '../../utils/logger.js';
|
||||||
import { Common } from '../../utils/common.js';
|
import { Common } from '../../utils/common.js';
|
||||||
import { WSServer } from '../../utils/webSocketServer.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 options = { url: '' };
|
||||||
const logger = Logger;
|
const logger = Logger;
|
||||||
const common = Common;
|
const common = Common;
|
||||||
@ -114,7 +114,9 @@ export const getApplicationSettings = (req, res, next) => {
|
|||||||
if (err) {
|
if (err) {
|
||||||
// Delete unnecessary data for initial response (without security token)
|
// Delete unnecessary data for initial response (without security token)
|
||||||
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
|
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.secret2FA = '';
|
||||||
appConfData.dbDirectoryPath = '';
|
appConfData.dbDirectoryPath = '';
|
||||||
appConfData.nodes[selNodeIdx].authentication = new Authentication();
|
appConfData.nodes[selNodeIdx].authentication = new Authentication();
|
||||||
|
File diff suppressed because one or more lines are too long
1
frontend/main.89468e89473d89c7.js
Normal file
1
frontend/main.89468e89473d89c7.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@ import { Database, DatabaseService } from '../../utils/database.js';
|
|||||||
import { Logger, LoggerService } from '../../utils/logger.js';
|
import { Logger, LoggerService } from '../../utils/logger.js';
|
||||||
import { Common, CommonService } from '../../utils/common.js';
|
import { Common, CommonService } from '../../utils/common.js';
|
||||||
import { WSServer } from '../../utils/webSocketServer.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 options = { url: '' };
|
||||||
const logger: LoggerService = Logger;
|
const logger: LoggerService = Logger;
|
||||||
@ -116,7 +116,9 @@ export const getApplicationSettings = (req, res, next) => {
|
|||||||
if (err) {
|
if (err) {
|
||||||
// Delete unnecessary data for initial response (without security token)
|
// Delete unnecessary data for initial response (without security token)
|
||||||
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
|
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.secret2FA = '';
|
||||||
appConfData.dbDirectoryPath = '';
|
appConfData.dbDirectoryPath = '';
|
||||||
appConfData.nodes[selNodeIdx].authentication = new Authentication();
|
appConfData.nodes[selNodeIdx].authentication = new Authentication();
|
||||||
|
@ -98,7 +98,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
this.actions.pipe(
|
this.actions.pipe(
|
||||||
takeUntil(this.unSubs[4]),
|
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)) => {
|
subscribe((action: (any)) => {
|
||||||
if (action.type === RTLActions.SET_APPLICATION_SETTINGS) {
|
if (action.type === RTLActions.SET_APPLICATION_SETTINGS) {
|
||||||
if (!this.sessionService.getItem('token')) {
|
if (!this.sessionService.getItem('token')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user