From cbdd0985289569a727878f08321e2dfaf8d30b32 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 14 Jul 2022 07:22:12 +0000 Subject: [PATCH 1/4] chore: version++ --- apps/api/src/lib/common.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index cb14fd89f..06a06d21c 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -16,7 +16,7 @@ import { day } from './dayjs'; import * as serviceFields from './serviceFields' import axios from 'axios'; -export const version = '3.1.1'; +export const version = '3.1.2'; export const isDev = process.env.NODE_ENV === 'development'; const algorithm = 'aes-256-ctr'; diff --git a/package.json b/package.json index 892dd2f30..e6b7f6407 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "3.1.1", + "version": "3.1.2", "license": "AGPL-3.0", "scripts": { "db:studio": "pnpm run --filter coolify-api db:studio", From b735ca2da7ff87b759949e66470ce7a33f812114 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 14 Jul 2022 07:22:26 +0000 Subject: [PATCH 2/4] fix: admin password reset should not timeout --- apps/api/src/routes/api/v1/handlers.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/apps/api/src/routes/api/v1/handlers.ts b/apps/api/src/routes/api/v1/handlers.ts index 95988f1f1..c76181294 100644 --- a/apps/api/src/routes/api/v1/handlers.ts +++ b/apps/api/src/routes/api/v1/handlers.ts @@ -157,10 +157,18 @@ export async function login(request: FastifyRequest, reply: FastifyReply) if (userFound.password === 'RESETME') { const hashedPassword = await hashPassword(password); if (userFound.updatedAt < new Date(Date.now() - 1000 * 60 * 10)) { - await prisma.user.update({ - where: { email: userFound.email }, - data: { password: 'RESETTIMEOUT' } - }); + if (userFound.id === '0') { + await prisma.user.update({ + where: { email: userFound.email }, + data: { password: 'RESETME' } + }); + } else { + await prisma.user.update({ + where: { email: userFound.email }, + data: { password: 'RESETTIMEOUT' } + }); + } + throw { status: 500, message: 'Password reset link has expired. Please request a new one.' From 344dd7db285764d511eb1a0ab1afbf2a27858579 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 14 Jul 2022 07:42:05 +0000 Subject: [PATCH 3/4] fix: message for double branches --- apps/api/src/routes/api/v1/applications/handlers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts index 858bedd5b..8f61997fb 100644 --- a/apps/api/src/routes/api/v1/applications/handlers.ts +++ b/apps/api/src/routes/api/v1/applications/handlers.ts @@ -267,7 +267,7 @@ export async function saveApplicationSettings(request: FastifyRequest Date: Thu, 14 Jul 2022 08:00:57 +0000 Subject: [PATCH 4/4] fix: turn off autodeploy if double branch is configured --- apps/api/src/routes/api/v1/applications/handlers.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts index 8f61997fb..b5e235335 100644 --- a/apps/api/src/routes/api/v1/applications/handlers.ts +++ b/apps/api/src/routes/api/v1/applications/handlers.ts @@ -267,6 +267,7 @@ export async function saveApplicationSettings(request: FastifyRequest