Fix base64 encoding for TOTP_VAULT_KEY
This commit is contained in:
		| @@ -1054,8 +1054,8 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal | |||||||
|                             serviceLabels: $serviceLabels, |                             serviceLabels: $serviceLabels, | ||||||
|                             is_gzip_enabled: $savedService->isGzipEnabled(), |                             is_gzip_enabled: $savedService->isGzipEnabled(), | ||||||
|                             is_stripprefix_enabled: $savedService->isStripprefixEnabled(), |                             is_stripprefix_enabled: $savedService->isStripprefixEnabled(), | ||||||
|                             service_name: $serviceName)); |                             service_name: $serviceName | ||||||
| 
 |                         )); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 if ($resource->server->isLogDrainEnabled() && $savedService->isLogDrainEnabled()) { |                 if ($resource->server->isLogDrainEnabled() && $savedService->isLogDrainEnabled()) { | ||||||
| @@ -1597,14 +1597,26 @@ function generateEnvValue(string $command, ?Service $service = null) | |||||||
|         case 'PASSWORD_64': |         case 'PASSWORD_64': | ||||||
|             $generatedValue = Str::password(length: 64, symbols: false); |             $generatedValue = Str::password(length: 64, symbols: false); | ||||||
|             break; |             break; | ||||||
|  |             // This is not base64, it's just a random string
 | ||||||
|         case 'BASE64_64': |         case 'BASE64_64': | ||||||
|             $generatedValue = base64_encode(Str::random(64)); |             $generatedValue = Str::random(64); | ||||||
|             break; |             break; | ||||||
|         case 'BASE64_128': |         case 'BASE64_128': | ||||||
|             $generatedValue = base64_encode(Str::random(128)); |             $generatedValue = Str::random(128); | ||||||
|             break; |             break; | ||||||
|         case 'BASE64': |         case 'BASE64': | ||||||
|         case 'BASE64_32': |         case 'BASE64_32': | ||||||
|  |             $generatedValue = Str::random(32); | ||||||
|  |             break; | ||||||
|  |             // This is base64,
 | ||||||
|  |         case 'REALBASE64_64': | ||||||
|  |             $generatedValue = base64_encode(Str::random(64)); | ||||||
|  |             break; | ||||||
|  |         case 'REALBASE64_128': | ||||||
|  |             $generatedValue = base64_encode(Str::random(128)); | ||||||
|  |             break; | ||||||
|  |         case 'REALBASE64': | ||||||
|  |         case 'REALBASE64_32': | ||||||
|             $generatedValue = base64_encode(Str::random(32)); |             $generatedValue = base64_encode(Str::random(32)); | ||||||
|             break; |             break; | ||||||
|         case 'USER': |         case 'USER': | ||||||
|   | |||||||
| @@ -12,7 +12,7 @@ services: | |||||||
|       - DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@plausible_db/plausible |       - DATABASE_URL=postgres://postgres:$SERVICE_PASSWORD_POSTGRES@plausible_db/plausible | ||||||
|       - BASE_URL=$SERVICE_FQDN_PLAUSIBLE |       - BASE_URL=$SERVICE_FQDN_PLAUSIBLE | ||||||
|       - SECRET_KEY_BASE=$SERVICE_BASE64_64_PLAUSIBLE |       - SECRET_KEY_BASE=$SERVICE_BASE64_64_PLAUSIBLE | ||||||
|       - TOTP_VAULT_KEY=$SERVICE_BASE64_TOTP |       - TOTP_VAULT_KEY=$SERVICE_REALBASE64_TOTP | ||||||
|     depends_on: |     depends_on: | ||||||
|       - plausible_db |       - plausible_db | ||||||
|       - plausible_events_db |       - plausible_events_db | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Andras Bacsai
					Andras Bacsai