Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabecinha84 committed Jan 14, 2025
1 parent 8ecd2f3 commit 44d4dbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ZelBack/src/services/appsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4888,7 +4888,7 @@ async function checkAppSecrets(appName, appComponentSpecs, appOwner, registratio
if (app.version >= 7 && app.nodes.length > 0) {
// eslint-disable-next-line no-restricted-syntax
for (const component of app.compose) {
if (component.secrets.length > 0 && JSON.stringify(component.secrets.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, '')) === JSON.stringify(appComponentSpecs.secrets.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, ''))) {
if (component.secrets.length > 0 && JSON.stringify(component.secrets.replace(/\W/g, '')) === JSON.stringify(appComponentSpecs.secrets.replace(/\W/g, ''))) {
if (registration) {
throw new Error(`Provided component ${appComponentSpecs.name} secrets are not valid`);
} else if (app.name !== appName) {
Expand All @@ -4912,7 +4912,7 @@ async function checkAppSecrets(appName, appComponentSpecs, appOwner, registratio
// eslint-disable-next-line no-restricted-syntax
for (const component of message.appSpecifications.compose) {
if (component.secrets.length > 0
&& JSON.stringify(component.secrets.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, '')) === JSON.stringify(appComponentSpecs.secrets.replace(/(\r\n|\n|\r)/gm, '').replace(/\\/g, ''))) {
&& JSON.stringify(component.secrets.replace(/\W/g, '')) === JSON.stringify(appComponentSpecs.secrets.replace(/\W/g, ''))) {
log.info('checkAppSecrets - found same secret');
log.info(`checkAppSecrets - appOwner: ${appOwner}`);
log.info(`checkAppSecrets - appOwner: ${message.appSpecifications.owner}`);
Expand Down

0 comments on commit 44d4dbc

Please sign in to comment.