coollabsio/coolify · error · RuntimeException

Bundle is not encrypted.

Error message

Bundle is not encrypted.

What it means

Error "Bundle is not encrypted." thrown in coollabsio/coolify.

Source

Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:132

        }

        $mac = hash_hmac('sha256', $iv.$cipher, $key);

        return [
            'encrypted' => true,
            'schema_version' => self::SCHEMA_VERSION,
            'payload' => base64_encode($iv.$mac.$cipher),
        ];
    }

    /**
     * @param  array<string, mixed>  $encrypted
     * @return array<string, mixed>
     */
    public static function decryptWithPassphrase(array $encrypted, string $passphrase): array
    {
        if (! data_get($encrypted, 'encrypted')) {
            throw new RuntimeException('Bundle is not encrypted.');
        }

        $raw = base64_decode((string) data_get($encrypted, 'payload'), true);
        if ($raw === false || strlen($raw) < 48) {
            throw new RuntimeException('Invalid encrypted payload.');
        }

        $key = hash('sha256', $passphrase, true);
        $iv = substr($raw, 0, 16);
        $mac = substr($raw, 16, 64);
        $cipher = substr($raw, 80);
        $expectedMac = hash_hmac('sha256', $iv.$cipher, $key);
        if (! hash_equals($expectedMac, $mac)) {
            throw new RuntimeException('Invalid passphrase or corrupted bundle.');
        }

        $json = openssl_decrypt($cipher, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);
        if ($json === false) {

View on GitHub (pinned to 70b9acc424)

When it happens

Trigger: Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:132 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of coollabsio/coolify@70b9acc424 (2026-08-17). Data as JSON: /api/errors/650024fa3fbfa8c6. Report an issue: GitHub.