An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: trim secrets
Andras Bacsai883bdc2879a7
diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.tsindex ce03c6e7ce..5f0f2aa2de 100644--- a/apps/api/src/routes/api/v1/applications/handlers.ts+++ b/apps/api/src/routes/api/v1/applications/handlers.ts@@ -657,13 +657,14 @@ export async function saveSecret(request: FastifyRequest<SaveSecret>, reply: Fasif (found) {throw { status: 500, message: `Secret ${name} already exists.` }} else {- value = encrypt(value);+ value = encrypt(value.trim());+ console.log({value})await prisma.secret.create({data: { name, value, isBuildSecret, isPRMRSecret, application: { connect: { id } } }});}} else {- value = encrypt(value);+ value = encrypt(value.trim());const found = await prisma.secret.findFirst({ where: { applicationId: id, name, isPRMRSecret } });if (found) {diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.tsindex bfd8a9352f..ae147cc4c4 100644--- a/apps/api/src/routes/api/v1/services/handlers.ts+++ b/apps/api/src/routes/api/v1/services/handlers.ts@@ -458,13 +458,13 @@ export async function saveServiceSecret(request: FastifyRequest<SaveServiceSecreif (found) {throw `Secret ${name} already exists.`} else {- value = encrypt(value);+ value = encrypt(value.trim());await prisma.serviceSecret.create({data: { name, value, service: { connect: { id } } }});}} else {- value = encrypt(value);+ value = encrypt(value.trim());const found = await prisma.serviceSecret.findFirst({ where: { serviceId: id, name } });if (found) {