[#NUMERO_TICKET] TITRE TICKET #2

Merged
malio merged 302 commits from develop into main 2026-03-18 13:16:19 +00:00
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 3dd2d39222 - Show all commits

2
.env
View File

@@ -20,4 +20,4 @@ JWT_COOKIE_TTL=86400
DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:${POSTGRES_PORT}/${POSTGRES_DB}?serverVersion=16&charset=utf8"
GITEA_ENCRYPTION_KEY=
ENCRYPTION_KEY=aaaaaaaaa

View File

@@ -4,7 +4,6 @@ declare(strict_types=1);
namespace App\Service;
use App\Exception\GiteaApiException;
use RuntimeException;
use SodiumException;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
@@ -15,7 +14,7 @@ final class TokenEncryptor
private readonly bool $configured;
public function __construct(
#[Autowire('%env(GITEA_ENCRYPTION_KEY)%')]
#[Autowire('%env(ENCRYPTION_KEY)%')]
string $encryptionKey,
) {
if ('' === $encryptionKey) {
@@ -75,7 +74,7 @@ final class TokenEncryptor
private function assertConfigured(): void
{
if (!$this->configured) {
throw new GiteaApiException('Gitea encryption is not configured. Please set a valid GITEA_ENCRYPTION_KEY.');
throw new RuntimeException('Encryption is not configured. Please set a valid ENCRYPTION_KEY.');
}
}
}