Skip to content

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.

fix(magic env) HEX secrets creating double the length of their name

Romain ROCHASe658d2f9a303
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 9f0f2cd739..d55a00a4ca 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -1463,13 +1463,13 @@ function generateEnvValue(string $command, Service|Application|null $service = n
$generatedValue = base64_encode(Str::random(32));
break;
case 'HEX_32':
- $generatedValue = bin2hex(Str::random(32));
+ $generatedValue = bin2hex(Str::random(16));
break;
case 'HEX_64':
- $generatedValue = bin2hex(Str::random(64));
+ $generatedValue = bin2hex(Str::random(32));
break;
case 'HEX_128':
- $generatedValue = bin2hex(Str::random(128));
+ $generatedValue = bin2hex(Str::random(64));
break;
case 'USER':
$generatedValue = Str::random(16);