{"record":{"id":"650024fa3fbfa8c6","repo":"coollabsio/coolify","slug":"bundle-is-not-encrypted","errorCode":null,"errorMessage":"Bundle is not encrypted.","messagePattern":"Bundle is not encrypted\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Services/ServerTransfer/ServerTransferBundle.php","lineNumber":132,"sourceCode":"        }\n\n        $mac = hash_hmac('sha256', $iv.$cipher, $key);\n\n        return [\n            'encrypted' => true,\n            'schema_version' => self::SCHEMA_VERSION,\n            'payload' => base64_encode($iv.$mac.$cipher),\n        ];\n    }\n\n    /**\n     * @param  array<string, mixed>  $encrypted\n     * @return array<string, mixed>\n     */\n    public static function decryptWithPassphrase(array $encrypted, string $passphrase): array\n    {\n        if (! data_get($encrypted, 'encrypted')) {\n            throw new RuntimeException('Bundle is not encrypted.');\n        }\n\n        $raw = base64_decode((string) data_get($encrypted, 'payload'), true);\n        if ($raw === false || strlen($raw) < 48) {\n            throw new RuntimeException('Invalid encrypted payload.');\n        }\n\n        $key = hash('sha256', $passphrase, true);\n        $iv = substr($raw, 0, 16);\n        $mac = substr($raw, 16, 64);\n        $cipher = substr($raw, 80);\n        $expectedMac = hash_hmac('sha256', $iv.$cipher, $key);\n        if (! hash_equals($expectedMac, $mac)) {\n            throw new RuntimeException('Invalid passphrase or corrupted bundle.');\n        }\n\n        $json = openssl_decrypt($cipher, 'AES-256-CBC', $key, OPENSSL_RAW_DATA, $iv);\n        if ($json === false) {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Services/ServerTransfer/ServerTransferBundle.php#L114-L150","documentation":"Error \"Bundle is not encrypted.\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Services/ServerTransfer/ServerTransferBundle.php:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}