Skip to content
Snippets Groups Projects
Commit b888a443 authored by Sebastian Mohr's avatar Sebastian Mohr
Browse files

Hotfix: SSO client id was redacted caused problems in production

parent 5ca2589b
No related branches found
No related tags found
No related merge requests found
Pipeline #561800 passed
......@@ -49,8 +49,11 @@ export function loadSSOConfig() {
export async function parseSSOProviderForUi(
providers: SSOProviderServer[],
): Promise<SSOProvider[]> {
// Copy providers
const providers_copy = structuredClone(providers);
// Check if img paths are valid and load image as data uri
for (const provider of providers) {
for (const provider of providers_copy) {
const imgPath = path.join(config.config_dir, provider.img);
if (!(await exists(imgPath))) {
console.warn(
......@@ -62,11 +65,9 @@ export async function parseSSOProviderForUi(
const img = await fs.readFile(imgPath);
provider.img = `data:image/png;base64,${img.toString("base64")}`;
provider.clientId = "redacted";
provider.clientSecret = "redacted";
}
return providers;
return providers_copy;
}
async function exists(f: string) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment